You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation on the Switch component shows a demo that does not comply with the accessibility guidelines detailed on the switch role requirements. I assumed that the htmlFor would associate the label's accessible text, but according to the guidelines:
The switch has an accessible label provided by one of the following:
Visible text content contained within the element with role switch.
A visible label referenced by the value of aria-labelledby set on the element with role switch.
Following the demo's example, my team used SwitchDemo as an example for our Storybook. The story flagged an accessibility violation involving the Switch not having accessible text.
Relevant Radix Component(s)
SwitchDemo example on the docs. I'd suggest we add the aria-labelledby to the switch, and the corresponding ID to the label:
Documentation
The documentation on the Switch component shows a demo that does not comply with the accessibility guidelines detailed on the switch role requirements. I assumed that the
htmlFor
would associate the label's accessible text, but according to the guidelines:Following the demo's example, my team used
SwitchDemo
as an example for our Storybook. The story flagged an accessibility violation involving the Switch not having accessible text.Relevant Radix Component(s)
SwitchDemo
example on the docs. I'd suggest we add the aria-labelledby to the switch, and the corresponding ID to the label:The text was updated successfully, but these errors were encountered: