-->
v10, react, theme
Operating system
Windows 7
Browser
Firefox and Chrome
There are different implementations of the toggle, but all fail contrast for the 'off' state.
What did you expect to happen?
The off state should meet the minimum contrast.
What WCAG 2.1 checkpoint does the issue violate?
Non-text Contrast
Please create a reduced test case in CodeSandbox
- Style and vanilla JS:
https://codesandbox.io/s/github/carbon-design-system/carbon/tree/master/packages/components/examples/codesandbox- React:
https://codesandbox.io/s/github/carbon-design-system/carbon/tree/master/packages/react/examples/codesandbox

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
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.
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.
Please note:
// on state
pill: $support-02
circle: $icon-03
// off state
pill: $ui-04
cirlce: $icon-03

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

I 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
Agreed, I like the focus options you chose.
Most helpful comment
No hover
I 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
Focus
Agreed, I like the focus options you chose.