-
Notifications
You must be signed in to change notification settings - Fork 379
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
[a11y] Refine ARIA implementation #806
Comments
I believe that this is impossible. Would it be acceptable to add the Could also that agency perform an audit of https://github.com/cibernox/ember-basic-dropdown? That is the component that contains a good amound of the a11y concerns. I believe that part of there issues arise because EPS is a combobox that is built on top of EBD, which is a more generic/agnostic click-here-and-content-will-appear. Not that it cannot be fixed, but I'd like to know which would be sane default for EBD, even it then EPS decides to overrides (p.e, disable |
I've experimented quickly with mixed results. But I think that all the pieces are ready, now you can play with this. I think it's close. |
any updates on this? |
We have added some parts in the last years and specially in v8 and the addon should be conform with a11y If something is missing/incorrect please open a new isuue for a11y improvment, so we will try to fix/improve it |
The following items resulted from an accessibility audit performed by Interactive Accessibility on an app I'm working on. I'm happy to take on the bulk of the work outlined below, but some of these changes may require non-trivial changes to the architecture of some of the add-on's components. I imagine I may need some assistance to make some of these changes without introducing breaking changes to the API or visual styling.
What's broken? / why do these changes need to be made?
The main issue currently is that due to incorrect implementation of aria roles and attributes the power-select component is not very usable by a screen reader. For example as as screen reader user keys through the options, the currently focused option can not be announced, and the number of available options can not be announced. This should be considered a "critical" issue from an a11y perspective. The items outlined below *should* fix this. ARIA is a complicated beast so I'm open to feedback on the items below. I've tried to provide links to W3C WAI-ARIA docs justifying these changes. At the end of the day these changes will need to be tested across a range of screen readers to ensure it functions correctly.Work items
https://www.w3.org/TR/wai-aria/roles#combobox
Currently the trigger's
aria-controls
attribute references an ID of a dom node that does not exist when the power-select is in the collapsed state. This is considered invalid markup and can break screen readers. The controlled element (the listbox) should be maintained in the dom even when collapsed, it can be an emptydiv
/ul
. - https://www.w3.org/TR/wai-aria/states_and_properties#aria-ownsaria-haspopup
is an implicit property of a combobox. Explicitly adding aria-haspopup implicitly and incorrectly defines the element as an aria menu (similar in semantics to a right-click contextual menu or the menu ribbon in MS Word or an OS), which not the correct role for the trigger. This attribute is not necessary on a combobox.https://www.w3.org/TR/wai-aria/states_and_properties#aria-haspopup
https://www.w3.org/TR/wai-aria/roles#combobox
aria-expanded
is sufficient to imply behavior to screen readers.aria-pressed
is intended for toggle buttons such as checkboxes or tri-state buttons.https://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed
role="button"
is inappropriately used here. The trigger should be given the combobox role and should be present in the dom as a combobox regardless of the expanded/collapsed state of the power-select. https://www.w3.org/TR/wai-aria/roles#comboboxEven when search is disabled the power-select is still a combobox and should be defined as one. aria-autocomplete should be set to "none" when search is disabled, or the attribute can be removed since "none" is the default aria-autocomplete value for a combobox
https://www.w3.org/TR/wai-aria/roles#combobox
When search is enabled the
aria-autocomplete="list"
attribute should be added to the comboboxhttps://www.w3.org/TR/wai-aria/states_and_properties#aria-autocomplete
aria-activedescendant allows a screen reader to track which option is currently focused. Each option needs an
id
, as focus changes from one option to the next this attribute should be updated to reference theid
of the selected option.https://www.w3.org/TR/wai-aria/states_and_properties#aria-selected
https://www.w3.org/TR/wai-aria-1.1/#aria-current
https://www.w3.org/TR/wai-aria/states_and_properties#aria-multiselectable
When groups are displayed all markup associated with a group should have
role="presentation"
. Currentlyrole="options"
is present on the groupli
elements AND the actual options which are nested inside the groups, which is invalid. Additionally, each group'sul
hasrole="group"
, which should be changed torole="presentation"
. Each group label should havetabindex="-1"
androle="presentation"
so that it can be focused an announced by screen readers.This is invalid. These lists do not actually control the trigger.
To replicate functionality of a native html
select
, a screen reader should be informed of the number of options in the power select. There should be a hiddendiv
withrole="status"
,aria-live="polite"
, and a uniqueid
which should be referenced by anaria-controls
attribute on the associated combobox.Add a hidden div with a unique id containing instructions for operating the power select or multiselect. This should be associated to the combobox using the
aria-describedby
attribute on the combobox, referencing the id of the div.ex "As you type suggestions will be made available. Browse the suggestions using the up and down arrow keys. Pressing enter will select the current option. Pressing escape will clear the current selection."
Test Plan
TBD
Most of this is probably difficult or impossible to test using typical acceptance/integration tests
The text was updated successfully, but these errors were encountered: