This repository was archived by the owner on Jan 14, 2025. It is now read-only.
[@material/react-switch] Missing aria-checked attribute in input element #996
Labels
Unresolved (Archived)
Open and unresolved issues and PRs that were closed due to archiving the repository.
Hi,
When I render the Switch component in Storybook with the A11Y addon, I get the following accessibility violation: "Required ARIA attribute not present: aria-checked."
I tried adding
aria-checked
andariaChecked
as Switch component props to see if it gets passed down directly, but it doesn't appear so. However, when I update the HTML directly and add in the attribute, the error in storybook goes away.Is this something we can add to the component or is there a reason why it's omitted from the element? I'm also happy to take a stab at creating a pull request if we decided to add the attribute. :)
The text was updated successfully, but these errors were encountered: