Skip to content

[docs] Improve a11y color contrast#4812

Merged
aarongarciah merged 1 commit into
mui:masterfrom
oliviertassinari:a11y-color-contrast
May 12, 2026
Merged

[docs] Improve a11y color contrast#4812
aarongarciah merged 1 commit into
mui:masterfrom
oliviertassinari:a11y-color-contrast

Conversation

@oliviertassinari
Copy link
Copy Markdown
Member

@oliviertassinari oliviertassinari commented May 12, 2026

The color used for --color-docs-infra-syntax-nullish works well in dark mode, but has a problem in light mode. For example, it breaks the 100% a11y score.

Before

SCR-20260512-blbh

https://base-ui.com/react/components/select

SCR-20260512-blda

After

One way to solve this is going from --color-gray-500 to --color-gray-600. This feels easier to read in light mode:

SCR-20260512-blee

And, personally, in dark mode too: https://deploy-preview-4812--base-ui.netlify.app/react/components/select#root.

Another option would be to change the color system (but then, it's no longer a quick win).

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation. type: bug It doesn't behave as expected. accessibility a11y labels May 12, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

commit: c8fdce9

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 12, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,773.98 ms 🔺+753.50 ms(+73.8%) | Renders: 50 (+0) | Paint: 2,686.41 ms 🔺+1,137.37 ms(+73.4%)

Test Duration Renders
Slider mount (300 instances) 264.97 ms 🔺+128.34 ms(+93.9%) 3 (+0)
Menu mount (300 instances) 210.29 ms 🔺+92.98 ms(+79.3%) 2 (+0)
Select mount (200 instances) 207.83 ms 🔺+91.68 ms(+78.9%) 3 (+0)
Tabs mount (200 instances) 288.36 ms 🔺+91.27 ms(+46.3%) 4 (+0)
Scroll Area mount (300 instances) 134.32 ms 🔺+60.16 ms(+81.1%) 3 (+0)

…and 7 more — details


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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit c8fdce9
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a02730ca7e6a60008c30706
😎 Deploy Preview https://deploy-preview-4812--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aarongarciah aarongarciah merged commit 646f580 into mui:master May 12, 2026
25 checks passed
@oliviertassinari oliviertassinari deleted the a11y-color-contrast branch May 12, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y docs Improvements or additions to the documentation. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants