Skip to content

[material-ui][Chip] Improve default avatar text contrast - #49576

Open
iBreaker wants to merge 1 commit into
mui:masterfrom
iBreaker:fix/chip-avatar-contrast
Open

iBreaker wants to merge 1 commit into
mui:masterfrom
iBreaker:fix/chip-avatar-contrast

Conversation

@iBreaker

Copy link
Copy Markdown

Fixes #49547.

The default Chip avatar used grey text that fell below the 4.5:1 minimum against its background in both light and dark modes. This changes the avatar text to black or white, including the corresponding CSS variable tokens, and adds computed-style contrast tests for both theme paths.

Tests:

  • pnpm test:unit run packages/mui-material/src/Chip/Chip.test.js
  • pnpm test:browser run packages/mui-material/src/Chip/Chip.test.js
  • pnpm exec eslint packages/mui-material/src/Chip/Chip.js packages/mui-material/src/Chip/Chip.test.js packages/mui-material/src/styles/createThemeWithVars.js
  • pnpm exec prettier --check packages/mui-material/src/Chip/Chip.js packages/mui-material/src/Chip/Chip.test.js packages/mui-material/src/styles/createThemeWithVars.js
@code-infra-dashboard

code-infra-dashboard Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49576--material-ui.netlify.app/
QR code for https://deploy-preview-49576--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+81B(+0.01%) 🔺+30B(+0.02%)
@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

Performance

No regressions in 32 benchmarks · ran 4m 14s · details


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

@iBreaker

Copy link
Copy Markdown
Author

The required-label check is failing because the PR has no label yet. I cannot apply labels from a fork; scope: chip and type: bug fit this change. The Argos screenshot change is expected from the avatar color update.

@zannager zannager added the scope: chip Changes related to the chip. label Oct 27, 2026
@zannager
zannager requested a review from DiegoAndai October 27, 2026 14:27
@DiegoAndai
DiegoAndai requested review from aarongarciah and removed request for DiegoAndai October 27, 2026 15:28

This branch has not been deployed

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

Labels

scope: chip Changes related to the chip.

2 participants