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

Dropdown button has invalid ARIA attribute (aria-invalid) #3290

Open
maggiewachs opened this issue Oct 21, 2024 · 0 comments
Open

Dropdown button has invalid ARIA attribute (aria-invalid) #3290

maggiewachs opened this issue Oct 21, 2024 · 0 comments

Comments

@maggiewachs
Copy link

maggiewachs commented Oct 21, 2024

Describe the bug
The dropdown component contains a button with aria-invalid assigned, which is being flagged by our instance of Siteimprove as an invalid use of ARIA. Dropdown source: https://github.com/CMSgov/design-system/blob/main/packages/design-system/src/components/Dropdown/Dropdown.tsx#L279

In previous ARIA recommendations, aria-invalid had a global scope, but the most recent version (1.2), narrowed the scope to specific roles. The aria-invalid attribute should be reassigned to the role="listbox" element.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Dropdown
  2. Inspect the dropdown example's source, and notice how the <button> element has aria-invalid="false"
  3. Close the inspector, and run the Siteimprove browser extension
  4. Siteimprove reports the error, "ARIA attribute unsupported or prohibited", and references aria-invalid on the button

Expected behavior
No ARIA violations.

Desktop (please complete the following information):

  • OS: Mac OS 14.6.1
  • Browser: Chrome latest
  • Version: CMS DS v11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant