Skip to content

[accessibility] Make Slider and some docs examples visible in HighContrast Mode#48320

Open
silviuaavram wants to merge 3 commits intomui:masterfrom
silviuaavram:fix/high-contrast-components
Open

[accessibility] Make Slider and some docs examples visible in HighContrast Mode#48320
silviuaavram wants to merge 3 commits intomui:masterfrom
silviuaavram:fix/high-contrast-components

Conversation

@silviuaavram
Copy link
Copy Markdown
Member

@silviuaavram silviuaavram commented Apr 17, 2026

Cherry picked some High Contrast improvements from this PR that were not part of the new High Contrast Theme.

Component Before After
Slider Screenshot 2026-04-16 at 16 13 46 Screenshot 2026-04-16 at 16 14 43
Customized Radio Example Screenshot 2026-04-15 at 20 49 00 Screenshot 2026-04-15 at 20 49 04
Rating Radio Example (Dark Mode) Screenshot 2026-04-15 at 20 45 33 Screenshot 2026-04-15 at 20 45 15

Copilot AI review requested due to automatic review settings April 17, 2026 13:51
@silviuaavram silviuaavram added the scope: slider Changes related to the slider. label Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@code-infra-dashboard
Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+85B(+0.02%) 🔺+16B(+0.01%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Deploy preview

https://deploy-preview-48320--material-ui.netlify.app/


Check out the code infra dashboard for more information about this PR.

@silviuaavram silviuaavram changed the title [accessibility] Make Slider visible in HighContrast Mode [accessibility] Make Slider and some docs examples visible in HighContrast Mode Apr 17, 2026
@silviuaavram silviuaavram self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y scope: slider Changes related to the slider.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants