Skip to content

Allow passing description props to <canvas> element #1097

@myasonik

Description

@myasonik

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.

Metadata

Metadata

Assignees

Labels

:accessibilityAccessibility related issuebugSomething isn't workingreleasedIssue released publicly

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions