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

[Toggle] Text when Disabled does not provide enough contrast and is difficult to read #9750

Closed
lily-peng opened this issue Sep 20, 2021 · 4 comments · Fixed by #10059
Closed

Comments

@lily-peng
Copy link

[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.

What WCAG 2.1 checkpoint does the issue violate?

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:
image

Example in Storybook, white background:
image

@abbeyhrt abbeyhrt transferred this issue from carbon-design-system/carbon-website Sep 27, 2021
@Spectre-ak
Copy link

Can I work on this?

@joshblack
Copy link
Contributor

cc @carbon-design-system/design wanted to double-check on what the tokens should for this situation 👀

@laurenmrice
Copy link
Member

The color token for disabled text should be $disabled-02. @lily-peng But for this situation, are you showing text and a status indicator to represent that the playbook is disabled? Instead of using disabled text, you could benefit from using a read-only state instead if it is important for the user to read and understand the content.

@aagonzales
Copy link
Member

Text contrast. Although disabled buttons are exempt from contrast requirements, we think it would still be beneficial to provide clearer contrast in these cases.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants