-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Accessibility Issue - Switch Control Missing Associated Label #17525
Comments
The 3rd toggle button is being flagged as missing a visible associated label:
Code from the DOM that is being flagged:
No. 3 switch exampleJAWS seems to correctly (?) reads the label (only once) for each toggle-button, including the 3rd switch, and whether "on" or "off". [after further investigation Oct 7, 2024] Is this the cause of the issue flagged by the Checker?The button element text is empty: Is that triggering the rule input_label_visible even thought JAWS seems to read it as if it's correct? Yes. I believe that although JAWS is reading the internal aria-label, that just happens (accidentally or on purpose) to match the visible label in the earlier I confirmed this could be fixed, and, pass the Checker rule by replacing the internal However, it kind of defeats this "bad" example of an internal "so-called-invisible" ARIA label, if that is what the Carbon switch No. 3 is trying to show. That is the clue I get from the label itself "Internal aria-label toggle". The switch label needs to be visible and programmatically associated with the switch to assistive tech, such as voice command & control, otherwise the user+AT doesn't know how to refer to the switch if it doesn't have an associated visible label by which to call it. It's not a Checker issue in my opinion, but a "bad" Carbon example. There are a couple examples where "invisible" labels are allowed, so not always a "Violation", which is why this |
In the screenshot with this issue, either the
and open a separate new Carbon issue to fix No. 3 switch example:
|
Package
@carbon/react
Browser
Chrome
Operating System
MacOS
Package version
1.40.0
React version
18.2.0
Automated testing tool and ruleset
IBM Equal Access Accessibility Checker
Assistive technology
No response
Description
the error we are getting :
In the Carbon Design System, the toggle control with the switch role is missing an associated label. This causes a accessibility violation, as it makes the control unusable for screen reader users.
WCAG 2.1 Violation
No response
Reproduction/example
Component: Toggle (With Accessible Labels) URL:https://react.carbondesignsystem.com/?path=/story/components-toggle--with-accessible-labels
Steps to reproduce
Suggested Severity
None
Code of Conduct
The text was updated successfully, but these errors were encountered: