a11y: Element with role combobox missing accessible name #219
Labels
auro-combobox
not-reviewed
Issue has not been reviewed by Auro team members
Type: Bug
Bug or Bug fixes
Please verify the version of auro-combobox you have installed
@latest
Please describe the bug
See the following code:
auro-combobox/src/auro-combobox.js
Lines 712 to 758 in 6e23ce9
One or more elements that has a role='combobox' attribute, not intentionally hidden in the DOM and available to assistive technologies, does not have a mechanism that allows an accessible name to be calculated.
Reproducing the error
This issue is reproducible on the Auro docsite
Expected behavior
When elements with
role
ofcombobox
do not have an accessible name, assistive technologies may incorrectly guess at a name or provide no name at all to users. When an accessible name is not present, users of assistive technologies may not be able to complete a form.What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
Recommendation
The following code changes are recommended to simplify the DOM rendering of the element and increase accessibility awareness for screen reader users.
for
attribute. Does not appear to be used anywhere else in the DOMaria-labelledby="combobox-label"
for accessible name associationid="combobox-label"
Additional recommendation
Within the
render()
function the return HTML is wrapped in an undefineddiv
element. This is not required for LitElement and serves no real purpose in the template. Recommend removing wrappingdiv
element.Additional state management
The following aria roles need to be considered, but undetermined where they should be added within this context. The issue of the
role="button"
currently makes this difficult to determine. a11yUX needs to be reviewed once issue AlaskaAirlines/auro-dropdown#273 is addressed.Exit criteria
The exit criteria for resolving this issue require the
auro-combobox
component to correctly implement accessible naming conventions, ensuring all elements with arole="combobox"
are identifiable by assistive technologies. The redundantfor
attribute must be removed, thearia-labelledby
attribute applied, and the wrappingdiv
element eliminated. Accessibility testing with screen readers and cross-browser validation must confirm the changes function as expected. Documentation should be updated to reflect the improvements, and any dependencies, such as issue #273 inauro-dropdown
, should be addressed to ensure compatibility. The final product must meet accessibility standards, pass QA review, and be released as an updated version.The text was updated successfully, but these errors were encountered: