victory
victory copied to clipboard
How to add roles? It is the best way? (see example)
Bugs and Questions
Checklist
-
[x] This is not a
victory-native
specific issue. (Issues that only appear invictory-native
should be opened here) -
[x] I have read through the FAQ and Guides before asking a question
-
[x] I am using the latest version of Victory
-
[ ] I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
Need a piece of advice. I tried to add roles to my components. Just wanted to ask if there is any "best" way to do it? https://codesandbox.io/s/winter-moon-2wwqz
My code does not seem to be working properly, because as I know in this case uses should be able to navigate the menu items in the example above by using arrow keys.
Reproduction
https://codesandbox.io/s/winter-moon-2wwqz
Hi @alexfrize, sorry it has taken a while for us to respond to this issue! We are currently working on some work around accessibility props, and we may be able to include the role
prop in this work. CC: @dlcartright
As a temporary workaround, you can use custom components to inject your own data component with a role
prop rather than passing that prop into Victory. Here's a similar example: https://github.com/FormidableLabs/victory/issues/2040#issuecomment-1000945126
hey @becca-bailey @dlcartright , can I pick this task? Please let me know.
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.