-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Properly implement the WAI accessibility standard for tabs #516
Comments
With regards to According to the https://w3c.github.io/aria/#tab the tab role supports Although that seems a bit strange seeing as that would mean tab would have some redundancy between |
@joeally I appreciate the catch on the That said, our tab component doesn't handle the markup for the tab panels. We leave that 100% up to the end user. So it's up to the end user if they want to comply or not. That is, unless like you said, we dramatically alter the way the tab component works. I'd say we would treat this as a feature request, and a PR would be welcome. Though I'd suggest submitting a PR early, as a draft, so we can discuss and formalize the structure as it's implemented. There's some considerations to be made with how our components are built and documented and I would feel more comfortable if that was a collaborate process for a first time contributor for a change of this size. I might suggest you reach out on Discord in our #contributor channel - that would allow for easier discourse back and forth. We can set a list of requirements upfront. Thanks! |
Hi @endigo9740 - Thanks for the speedy response.
I think this is reasonable so long as there is a way to pass in the ID of the tabpanel to the When I get some time i'll try to create a draft PR for this. I'd also like to thank you and the team for your hard work on this project. Keep up the good work 🥇 |
True, that is a consideration. Ok sounds good. I welcome the help. Thanks! |
@joeally Just checking to see if you're still interested in handling this. If not I'll put it on my docket in the immediate future. |
No response so I've unassigned this one. It's open to anyone willing and able. |
Note to self: it may be nice to allow for tabs to work like anchors for route navigation. We've had a few people request this sort of functionality. It would operate similar to how our AppRail/Tile components work. Reference on Discord: |
I'll aim to handle this as part of: #782 |
Implemented as part of: #857 Please feel free to test and post feedback in that ticket. |
Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!
Currently the implementation of tabs does not indicate which tab is selected via
aria-selected
. See the screenshot:Note that this is described in the MDN docs :
Tabs also don't allow the user to set
aria-controls
to indicated which tab panel a tab is linked with. As per the MDN docs:In an ideal world the component would put content in an element with the role
tabpanel
and set the relevant tab panel to have. From the MDN docs:aria-expanded
setBut this might be difficult given the current API so at the very least the documentation should show examples with
[role="tabpanel"]
and.aria-expanded
setI can have a go at a PR if you like but it would almost certainly require a change to the API so I wouldn't want to start until the API is decided.
Apart from that the Tabs component does not implement the keyboard actions specified in WAI but perhaps we should leave that for another time.
What type of pull request would this be?
Enhancement
Any links to similar examples or other references we should review?
Please refer to:
The text was updated successfully, but these errors were encountered: