[accessibility] Make Slider and some docs examples visible in HighContrast Mode#48320
Open
silviuaavram wants to merge 3 commits intomui:masterfrom
Open
[accessibility] Make Slider and some docs examples visible in HighContrast Mode#48320silviuaavram wants to merge 3 commits intomui:masterfrom
silviuaavram wants to merge 3 commits intomui:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves high-contrast/forced-colors accessibility by ensuring key UI affordances (notably Slider parts and certain docs examples) remain visually perceivable when user agent colors are enforced.
Changes:
- Add transparent borders (and
boxSizing) to Slider rail/thumb to allow high-contrast rendering to surface an outline/border. - Update a Rating demo to read the disabled color from
(theme.vars || theme)for CSS variables theme compatibility. - Improve radio button demos for accessibility/forced-colors (forced-colors styling for customized radios; helper text reset behavior in error radios).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/mui-material/src/Slider/Slider.js | Adds transparent borders / border-box sizing on rail and thumb to support High Contrast visibility. |
| docs/data/material/components/rating/RadioGroupRating.tsx | Uses `(theme.vars |
| docs/data/material/components/rating/RadioGroupRating.js | Same as TS version for the JS demo. |
| docs/data/material/components/radio-buttons/ErrorRadios.tsx | Simplifies change handler and resets helper text to a meaningful string. |
| docs/data/material/components/radio-buttons/ErrorRadios.js | Mirrors TS change handler behavior in JS demo. |
| docs/data/material/components/radio-buttons/CustomizedRadios.tsx | Adds forced-colors: active styling to ensure custom radio visuals remain visible. |
| docs/data/material/components/radio-buttons/CustomizedRadios.js | Mirrors forced-colors styling changes in JS demo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bundle size
Deploy previewhttps://deploy-preview-48320--material-ui.netlify.app/ Check out the code infra dashboard for more information about this PR. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry picked some High Contrast improvements from this PR that were not part of the new High Contrast Theme.