-
Notifications
You must be signed in to change notification settings - Fork 524
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
Feature/VictoryBar & Bar components ariaLabel and tabIndex [ready] #1687
Conversation
@ljones87 this is looking great! I see that you also pulled the
I'm happy for you to carry the pattern you're putting in place, though, since it is a bit more convenient and potentially less confusing |
I'm happy for these to all come in as granular PRs, but let's save the docs updates until the end, since they deploy on merges to |
Hopefully I'll be able to start chunking a few together at a time, in whatever amount makes sense to still keep the PR's easily reviewable |
d8502b9
to
672150f
Compare
@ljones87 This is looking good, but please change from |
@ljones87 Sorry for the back and forth, actually, since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! @boygirl had good feedback, and it was nicely addressed. Lets merge
This PR adds the following props to the
VictoryBar
component:ariaLabel
: string or callbacktabindex
: number or callbackBars can now be tabbed individually with a unique aria-label applied to each (using the props available in the
CallbackArgs
:This new feature is demo-able by running this branch, visiting localhost:3000 and clicking the new AccessibilityDemo link (both ts and standard js)
From there you can click anywhere on the bar graph space, hit tab, and you should see the focus move from one bar to the next. Inspecting the elements via devtools should show the aria-labels on each path component.
Todo:
I would like to PR a change like this for each of the component packages, adding the newly accessible chart (if it isn't already) to the accessibility demo.