Skip to content

fix(web-components): keep switch indicator visible in forced-colors mode - #36742

Open
megumiimai wants to merge 1 commit into
microsoft:masterfrom
megumiimai:fix/36676-switch-forced-colors-indicator
Open

megumiimai wants to merge 1 commit into
microsoft:masterfrom
megumiimai:fix/36676-switch-forced-colors-indicator

Conversation

@megumiimai

Copy link
Copy Markdown

Previous Behavior

In forced-colors mode (Windows High Contrast), the fluent-switch indicator used ActiveCaption (deprecated, resolves to Canvas) when unchecked and ButtonFace when checked. On dark themes the unchecked indicator rendered the same color as the background and was invisible.

New Behavior

The indicator now uses CanvasText when unchecked and HighlightText when checked. Both are paired system colors with guaranteed contrast against Canvas and Highlight respectively, so the thumb stays visible in both light and dark forced-colors themes. This matches the CanvasText usage in the v9 React Switch.

Related Issue(s)

Fixes #36676

  • Fixes #

@megumiimai
megumiimai requested a review from a team as a code owner September 15, 2026 23:02
@megumiimai

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Web Components Switch indicator is not visible in forced colors

1 participant