-
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
Off state of toggle (and small toggle) lacks 3:1 contrast with adjacent color (background) #3614
Comments
CC @carbon-design-system/design just to see if the team has had a discussion on this topic. |
Waaaaait I know this issue must be fixed this sprint but y’all don’t know which colors are accessible yet with the new color palette getting implemented. Hang on till tomorrow. |
Toggle final spec (updated according to Anna's comment below)Please note:
Focus styling updateAdditional change is adding a white inside border to focus state, so the focus border is 3:1 accessible against component & background. Reference the same treatment in primary button. |
No hoverI don't think it should have a hover. Most toggles ive seen in the wild don't have a hover. Also similar control in Carbon, like check box and radio, don't have hovers FocusAgreed, I like the focus options you chose. |
* fix(toggle): update colors Fixes #3614. * chore(toggle): add explanation of base box-shadow
Off state of toggle lacks 3:1 contrast with adjacent color ( either internal circle or background)
-->
Environment
v10, react, theme
Detailed description
There are different implementations of the toggle, but all fail contrast for the 'off' state.
Steps to reproduce the issue
Additional information
Storybook Toggle on (sufficient)
Storybook Toggle off (insuficient 2.5:1 between oval and lighter gray of circle)
Theme on and off toggle (same failure ratio as first screen shot)
V10 showing on and insufficient off toggle ( contrast for 1.8:1)
v10 Toggle small, with similar challenges for the 'off' toggle
Notes
In a situation where ALL the toggle versions contained a visible text state (On/Off) the non-text contrast could likely be excused since the visual cue would be redundant to the text and thus not required ("Visual information required to identify user interface components and states...)
That is, with a text state of "off" visible, the user no longer needs to discern the state of the toggle. However, this is a fairly easy issue to resolve -- just ensure the toggle border is 3:1 against the white background (for the v10 version) and that the circle is a lighter gray (or white) so that it is visible.
The text was updated successfully, but these errors were encountered: