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

Add changes to allow for improved accessibility on charts. #1054

Merged
merged 1 commit into from
Sep 12, 2020

Conversation

erik-1234
Copy link
Contributor

This PR allows for improved a11y on the charts that use the <SvgWrapper> component.

Currently, <SvgWrapper> has the default role on the tag set to role="img". This makes the chart inaccessible to screen readers. Adding a role prop to the <Bar> component, and passing through to <SvgWrapper> allows for accessibility by optionally setting the role to group.

There's also the addition of the ariaHidden prop to the Axis component. When this value is set to true and the chart is accessible, it will allow the user to skip over the values of the axes when using a screen reader which can improve the user experience.

@jeffreyffs
Copy link

@plouc This would be very helpful for improving the accessibility of the charts. Would it be possible to take a look?

@peterhry
Copy link

peterhry commented Aug 5, 2020

@plouc Any update on this? Our company is hoping to continue using Nivo but we depend on this enhancement.

@peterhry
Copy link

bump

@plouc
Copy link
Owner

plouc commented Aug 13, 2020 via email

Copy link
Owner

@plouc plouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@plouc plouc merged commit 464185c into plouc:master Sep 12, 2020
@plouc
Copy link
Owner

plouc commented Sep 12, 2020

@erik-1234, thank you for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

4 participants