-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 aria-expanded to Button component reflecting isToggled #473
Comments
Hm not exactly :) Instead, when a button expands or collapses a sidebar (or any toggleable section), the most appropriate ARIA attribute to use is |
Interesting. The spec reads as though it applies to a single button with on/off states:
https://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed I agree
https://www.w3.org/TR/wai-aria/states_and_properties#aria-expanded I'll update the issue accordingly. |
Yeah, but on a single button doesn't help so much. The practical effect is screen readers (VoiceOver for example) will announce the button as
About |
@aduth I was thinking to close this and set |
That sounds fine to me @afercia 👍 |
Tip from @afercia at #392 (comment) :
In #449 (cc @youknowriad), we introduced a new
isToggled
prop to theButton
component to indicate the toggled state of the sidebar.Given above, it's probably appropriate to apply thearia-pressed
attribute when this prop istrue
orfalse
(attribute reflecting prop, omitted whenundefined
).Related resource: https://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed
Edit:
Per discussion below,
aria-expanded
(andaria-controls
) most accurately describe this behavior.The text was updated successfully, but these errors were encountered: