Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility]: aria-label of charts toolbar all have same ID #1838

Open
danielannan17 opened this issue Jun 7, 2024 · 1 comment
Open

Comments

@danielannan17
Copy link

Application/Team

API Connect

Environment

Browser

What happened? What did you expect to happen instead?

When you use multiple charts on the same page, you're given an accessibility violation due to all the chart toolbars having the same aria-label

charts-toolbar-html

violation

What WCAG 2.1 checkpoint does the issue violate?

4.1.2

Version

@carbon/charts-react@1.16.3

Data & options used

No response

Relevant log output

No response

StackBlitz repro

No response

What priority level would this issue be in your opinion?

P0

@tombrunet
Copy link

Adding some info, since this came up on accessibility office hours from another team. It looks like the aria-label is hardcoded and doesn't include the chart name or any identifying information from the chart:

.attr('aria-label', `chart toolbar`)

It looks like someone tried to solve this using a random id, but then had to be pulled again because this solution doesn't account for the fact that these are human consumable string and not programmatic ids: (162e410)

Also related issue: #1728

We need some way to have it be something like ${chart title} toolbar, or provide the user for a way to override the toolbar title in the chart options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants