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

fix: fast-select has combobox role accessibility violation #5725

Closed
m-akinc opened this issue Mar 9, 2022 · 2 comments
Closed

fix: fast-select has combobox role accessibility violation #5725

m-akinc opened this issue Mar 9, 2022 · 2 comments
Assignees
Labels
area:fast-foundation Pertains to fast-foundation status:needs-investigation Needs additional investigation

Comments

@m-akinc
Copy link
Contributor

m-akinc commented Mar 9, 2022

🐛 Bug Report

Foundation select has Lighthouse violations due to combobox role.

💻 Repro or Code Sample

  1. Go to https://explore.fast.design/components/fast-select in Chrome or Edge
  2. Open the dev tools and go to the Lighthouse tab
  3. Generate report
  4. Go to the Accessibility section of the report. The first error is 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 has role="combobox".
image
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 with role="option" are not direct children of the fast-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

@m-akinc m-akinc added the status:triage New Issue - needs triage label Mar 9, 2022
@m-akinc m-akinc changed the title fix: [what is the issue?] in [where is the issue?] fix: fast-select has combobox role accessibility violation Mar 9, 2022
@chrisdholt
Copy link
Member

Thanks for the issue @m-akinc - we'll work to investigate.

@radium-v can you investigate and see if this is still an issue? I know we've recently done some work here and it's possible that the explorer may not be fully up to date. If this is still showing as an issue, let's revisit the recent work done to stay aligned with the ARIA specification (1.2).

@radium-v
Copy link
Collaborator

radium-v commented Apr 4, 2022

I can't reproduce this in these browsers:

  • Chrome 100.0.4896.75 (Official Build) (64-bit)
  • Edge 100.0.1185.29 (Official build) (64-bit)

The Combobox and Select components follow the ARIA 1.2 documentation:

A combobox input MAY be either a single-line text field that supports editing and typing or an element that only displays the current value of the combobox.

@radium-v radium-v closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation status:needs-investigation Needs additional investigation
Projects
None yet
Development

No branches or pull requests

3 participants