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

[Bug]: indeterminate state for sp-swatch shows an "Elements must only use supported ARIA attributes" error #4518

Closed
1 task done
Rocss opened this issue May 29, 2024 · 0 comments · Fixed by #4519
Closed
1 task done
Labels
a11y Issues related to accessibility bug Something isn't working Component: Swatch triage An issue needing triage

Comments

@Rocss
Copy link
Contributor

Rocss commented May 29, 2024

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

sp-swatch

Expected behavior

No accessibility warnings should be thrown

Actual behavior

Issue was observed in Express, but it is reproducing on Spectrum Web Components documentation as well: https://opensource.adobe.com/spectrum-web-components/components/swatch/

Screenshots

Screenshot 2024-05-29 at 14 12 58 Screenshot 2024-05-29 at 15 03 21

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

  1. Go to https://opensource.adobe.com/spectrum-web-components/components/swatch/
  2. Open the axe-devtools extension and run a full scan of the page
  3. Observe the accessibility error: "Ensures an element's role supports its ARIA attributes"

Sample code that illustrates the problem

While aria-checked="mixed" would be useful in a sp-swatch-group where the role of the sp-swatch would be checkbox, in a single sp-swatch which surfaces the role=button, the use of aria-checked is invalid.
The "mixed" state should be part of the aria-label in this case.

Logs taken while reproducing problem

No response

@Rocss Rocss added bug Something isn't working triage An issue needing triage a11y Issues related to accessibility Component: Swatch labels May 29, 2024
@Rocss Rocss linked a pull request May 30, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to accessibility bug Something isn't working Component: Swatch triage An issue needing triage
Projects
None yet
1 participant