-
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
[Toggle] Text when Disabled does not provide enough contrast and is difficult to read #9750
Comments
Can I work on this? |
cc @carbon-design-system/design wanted to double-check on what the tokens should for this situation 👀 |
The color token for disabled text should be |
If a user needs to be able to read the toggle then you should not be using the disabled component. Disabled components are not accessible by screen-readers and will be skipped and therefore increase the legibility contrast will only help sighted user with the disabled state. I'd advise exploring other ways to signal the ux interaction you're trying at achieve such as a read-only state as Lauren suggest or perhaps adding a lock icon beside the toggle to signify it can't be changed. |
[Toggle] Text when Disabled does not provide enough contrast and is difficult to read
Environment
All browsers
Detailed description
Latest version of Carbon. We notice the colors chosen for when the Toggle component is disabled doesn't provide enough contrast to read the text. Furthermore, in our product specifically (SOAR Playbook Designer), we use Gray-90 as the background for the Toggle, and when disabled, the Toggle SVG's background matches the same color and isn't discernible.
Text contrast. Although disabled buttons are exempt from contrast requirements, we think it would still be beneficial to provide clearer contrast in these cases.
Additional information
Example in product (SOAR Playbook Designer) Gray-90 background:
Example in Storybook, white background:
The text was updated successfully, but these errors were encountered: