Component
Switch
Package version
3.1.2
@microsoft/fast-element version
the latest
Environment
Go to the Fluent Web Components Switch Storybook: 3.1.2 as of this bug creation.
|https://storybooks.fluentui.dev/web-components/?path=/docs/components-switch--docs&globals=theme:web-dark
Current Behavior
When using the Fluent Web Components fluent-switch Windows forced colors enabled, the switch indicator/thumb is rendered black or white depending if light or dark mode.
The indicator should use a forced-colors system color that maintains contrast, such as CanvasText, ButtonText.
Expected Behavior
The switch indicator should remain clearly visible when forced-colors: active is enabled, regardless of whether the application is using the light or dark Fluent theme.
Reproduction
The switch indicator/thumb renders black against a black background, causing it to visually disappear.
Steps to reproduce
- Open the Fluent Web Components Switch Storybook: Components / Switch - Docs
- Make sure the Storybook theme is set to Web Dark.
- Open browser DevTools.
- Open More tools > Rendering.
- Set Emulate CSS media feature forced-colors to active.
- Alternatively, enable a Windows High Contrast theme.
- Review the fluent-switch component.
- Observe the switch indicator/thumb.
Are you reporting an Accessibility issue?
yes
Suggested severity
Medium - Has workaround
Products/sites affected
NXT
Are you willing to submit a PR to fix?
yes
Validations
Component
Switch
Package version
3.1.2
@microsoft/fast-element version
the latest
Environment
Current Behavior
When using the Fluent Web Components fluent-switch Windows forced colors enabled, the switch indicator/thumb is rendered black or white depending if light or dark mode.
The indicator should use a forced-colors system color that maintains contrast, such as CanvasText, ButtonText.
Expected Behavior
The switch indicator should remain clearly visible when forced-colors: active is enabled, regardless of whether the application is using the light or dark Fluent theme.
Reproduction
The switch indicator/thumb renders black against a black background, causing it to visually disappear.
Steps to reproduce
Are you reporting an Accessibility issue?
yes
Suggested severity
Medium - Has workaround
Products/sites affected
NXT
Are you willing to submit a PR to fix?
yes
Validations