Describe the bug
There is no way to set aria-describedby on a chart.
Notes on implementation
- With the end goal being something akin to this demo, I'd recommend not consuming
aria-* props directly because in the long-term we won't use many. Rather, I'd recommend using describedby. This, I hope, is both clear as a standalone prop name and hopefully hints at what their implementation might be/mean.
- I'd also recommend accepting
description as a prop. aria-description is currently a spec'ed property (that isn't implemented anywhere) so it serves to future proof a little and it's easy to shim in Charts to provide a nicer API for consumers. (If a user passes in a description, render their text to a visually hidden <p> with a random ID and add aria-describedby to the <canvas> pointing to that ID.
Describe the bug
There is no way to set
aria-describedbyon a chart.Notes on implementation
aria-*props directly because in the long-term we won't use many. Rather, I'd recommend usingdescribedby. This, I hope, is both clear as a standalone prop name and hopefully hints at what their implementation might be/mean.descriptionas a prop.aria-descriptionis currently a spec'ed property (that isn't implemented anywhere) so it serves to future proof a little and it's easy to shim in Charts to provide a nicer API for consumers. (If a user passes in adescription, render their text to a visually hidden<p>with a random ID and addaria-describedbyto the<canvas>pointing to that ID.