fix: fast-select has combobox role accessibility violation #5725
Labels
area:fast-foundation
Pertains to fast-foundation
status:needs-investigation
Needs additional investigation
🐛 Bug Report
Foundation select has Lighthouse violations due to
combobox
role.💻 Repro or Code Sample
Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children.
🤔 Expected Behavior
There should not be an
Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children.
error.😯 Current Behavior
The error is reported on the
fast-select
element, which hasrole="combobox"
.W3C specifies, among other requirements, that "Authors MUST ensure an element with role combobox contains or owns a text input element with role textbox or searchbox". This is definitely not the case for
fast-select
.💁 Possible Solution
Even setting the role to
listbox
(which seems more appropriate for a select-style control) results in the same violation. Presumably, this is because the child items withrole="option"
are not direct children of thefast-select
element, but rather nested under another element.It may be reasonable to remove the role attribute entirely.
🔦 Context
We are developing a design system on top of FAST, and we have a test app including a select that is not passing the Lighthouse accessibility checks. This is the last issue keeping it from passing at 100%.
🌍 Your Environment
NA
The text was updated successfully, but these errors were encountered: