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

Named state example #21

Open
scottaohara opened this issue May 7, 2022 · 1 comment
Open

Named state example #21

scottaohara opened this issue May 7, 2022 · 1 comment
Labels
a11y accessibility issues

Comments

@scottaohara
Copy link

This example doesn't communicate the currently chosen color option. And using aria-pressed on the button here wouldn't necessarily be the right choice, as that alone would indicate that the choice can be toggled on or off. However, here the choice can only be turned on, and by doing so it turns off the previously chosen choice.

A pattern like this might be better exposed as either a series of radios, possibly a menubar > menuitemradio, or continue to use buttons but ensure that it's clear that a second activation won't undo the toggle. aria-current=true might be a better choice for this as it represents the current choice without suggesting that the button should behave as a toggle. Otherwise, people have also used aria-pressed but also implemented aria-disabled to indicate that the button cannot be 'unpressed'.

These sorts of subtleties don't seem like they are possible via the current draft/explainer? Maybe I'm missing something.

@jerivas
Copy link
Member

jerivas commented May 12, 2022

Agree, the draft will need to consider use cases like this more carefully

@mirisuzanne mirisuzanne added the a11y accessibility issues label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y accessibility issues
Projects
None yet
Development

No branches or pull requests

3 participants