[switch] Add border to make it visible in high contrast mode by silviuaavram · Pull Request #48180 · mui/material-ui (original) (raw)

Pull request overview

Improves Switch visibility in Windows/forced-colors (high contrast) mode by ensuring the control has a border that can be picked up by forced-colors rendering, and adds a visual regression check to guard the behavior.

Changes:

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/regressions/index.test.js Adds a forced-colors visual regression screenshot for Switch.
test/regressions/fixtures/Switch/SimpleSwitch.js Adds a minimal Switch fixture used by the regression runner.
packages/mui-material/src/Switch/Switch.js Adds border styling intended to make Switch visible in forced-colors/high contrast.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.