-
Notifications
You must be signed in to change notification settings - Fork 378
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
Fix a11y issues with inputs #1306
Conversation
8cc0ffc
to
2988db7
Compare
Anything I can do to help move this along (or change)? Would love to see this land :) |
2988db7
to
fa3ed70
Compare
fa3ed70
to
f3dacf9
Compare
f3dacf9
to
19adde4
Compare
I have updated this a bit, also adding |
Thanks for opening this, I skipped an accessibility audit in tests that use Power Select for now because it seemed like it would involve too many template overrides. I know @cibernox is always busy but let us know if there’s any way we can help this move along 💞 |
b70d72b
to
9dec058
Compare
9dec058
to
24f9f40
Compare
@mydea would you be able to rebase this and fix the conflicts please? |
24f9f40
to
2f35484
Compare
sorry, took some time, but managed to rebase it. FYI, there are still some major accessibility issues, but they are harder to fix... The main problem I see is that there are nested interactive elements in the multi select (the trigger is interactive, and then inside of it there are both the "x" remove buttons as well as the search input). IMHO the way to "solve" this is to refactor the multi-select to also have the search in the dropdown, similar to the single select. But this is of course a larger change. I wrote some thoughts together here: #1539 |
Also remove `type="listbox"` from search input, as that is redundant and axe complains about it.
Otherwise, axe complains that the aria-controls element it refers to doesn't exist.
Otherwise, the input has no label. This also removes the role="combobox" from the input, as that is redundant for input type="search" and axe also complains about it.
2f35484
to
04e58eb
Compare
I rebased, and I think this should be backwards compatible, as it only adds/remove some attributes, but doesn't change any structure. |
This PR fixes (or at least allows to fix) lingering accessibility issues reported by axe (via ember-a11y-testing):
aria-label
&aria-labelled-by
to all search inputsrole="combobox"
from search input (See Allow using role 'combobox' on a native input element with type="search" dequelabs/axe-core#1580)It builds on top of #1305 - I can change that, if required.
With these changes, I could get axe to pass - as long as I added a label, like this:
IMHO it would be nice to add this somewhere to the docs, maybe to the cookbook? But that is a separate issue :)