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

Should you be able to focus on a button that is disabled? #317

Closed
zepumph opened this issue Sep 26, 2017 · 6 comments
Closed

Should you be able to focus on a button that is disabled? #317

zepumph opened this issue Sep 26, 2017 · 6 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Sep 26, 2017

In phetsims/reactants-products-and-leftovers#56 I realized that when a button is disabled via the enabledProperty, it is still focusable with a11y. @jessegreenberg how is the best way to tackle this. I don't think we want this functionality.

@jessegreenberg
Copy link
Contributor

Good question @zepumph, I am not sure. I have read that it is important for a11y to keep disabled buttons focusable so that AT users can still find them and so the flow remains the same. AT read these buttons as "Disabled". (https://ux.stackexchange.com/questions/103239/should-disabled-elements-be-focusable-for-accessibility-purposes)

But it looks like Chrome removes disabled buttons by default! (https://jsfiddle.net/pLuk8th0/)

@terracoda do you have any thoughts about this?

@jessegreenberg
Copy link
Contributor

W3C recommendation is pretty vague: https://www.w3.org/TR/wai-aria/states_and_properties#aria-disabled.

Disabled elements might not receive focus from the tab order.

@jessegreenberg
Copy link
Contributor

Now I am leaning toward removing these from focus order, from MDN:

If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.

But it would still be good to hear from @terracoda.

@terracoda
Copy link
Contributor

@zepumph, I will look into this, but my intuition is that a control that is disabled and visible should be findable and communicated as disabled to AT users. Need to check about the actual findability level (remains in Tab order, or remains findable with cursor keys).

@jessegreenberg
Copy link
Contributor

@terracoda in a discussion today with @emily-phet and @zepumph we decided that it was best to keep disabled buttons in the navigation order like your original intuition. @zepumph brought up that that for groups of UI components that can be enabled/disabled it is much more convenient to remember how many buttons are in the order and leverage that to navigate the page quickly. In that sense it is less convenient for the user to remove them. Since the W3C recommendation lets us chose, we are going to proceed with this. Closing issue, but let us know if you have concerns.

@terracoda
Copy link
Contributor

@jessegreenberg, sounds good. Sorry I didn't get back to you on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants