Chip text grey color breaks contrast requirements when Avatar with text is used inside
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
Research direction
Start in the Chip and Avatar component styles, especially the theme rules shown in the issue. Reproduce the avatar chip example in dark theme and check which Chip text rule overrides the Avatar text color. Adjust the styles so Chip text rules do not affect a nested Avatar, then verify the avatar initials meet contrast requirements.
Written by the indexing model from the issue text.
Description
Steps to reproduce
Steps:
- Open this link to live example: (required)
- See the example of the Chip with Avatar inside that uses initials
- Use dark theme
- See that the avatar text color compared to its background does not meet contrast requirements: https://webaim.org/resources/contrastchecker/?fcolor=616161&bcolor=BDBDBD
Current behavior
In dark theme, the text color computed inside MUII Chip overrides the Avatar text color when it is placed inside. This new color combined with Avatar background dolor do not meet the WCAG contrast requirements: https://webaim.org/resources/contrastchecker/?fcolor=616161&bcolor=BDBDBD
memoTheme(({ theme }) => {
const textColor =
theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
return {
{
backgroundColor: theme.palette.grey[400],
...theme.applyStyles('dark', { backgroundColor: theme.palette.grey[600] }),
}),
Expected behavior
Text rules of Chip component should not be applied to Avatar component used inside
Context
No response
Your environment
npx @mui/envinfo
System:
OS: macOS 26.6.2
Binaries:
Node: 24.16.0 - /usr/local/bin/node
npm: 11.13.0 - /usr/local/bin/npm
pnpm: Not Found
Browsers:
Chrome: 156.0.8078.47
Edge: Not Found
Firefox: Not Found
Safari: 26.6.2
npmPackages:
@emotion/react: ^11.14.0 => 11.14.0
@emotion/styled: ^11.14.0 => 11.14.1
@mui/core-downloads-tracker: 9.5.0
@mui/icons-material: ^9.5.0 => 9.5.0
@mui/lab: ^9.0.0-beta.3 => 9.0.0-beta.3
@mui/material: ^9.5.0 => 9.5.0
@mui/private-theming: 9.5.0
@mui/styled-engine: 9.5.0
@mui/system: 9.5.0
@mui/types: 9.5.0
@mui/utils: 9.5.0
@types/react: ^19.2.18 => 19.2.18
react: ^19.2.8 => 19.2.8
react-dom: ^19.2.8 => 19.2.8
typescript: ^6.0.3 => 6.0.3
Search keywords: chip avatar contrast grey text color
- Dominant language
- JavaScript
- Stars
- 99.2k
- Forks
- 32.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 212
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mui/material-ui
-
status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mui/material-ui#49521 ·
Maintainers usually reply within 1 day
-
[a11y][Chip] Clickable always assigned to componentPossibly taken @silviuaavram claimed this 3 days ago. Openaccessibility status: waiting for author
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
mui/material-ui#49511 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[SwipeableDrawer] Taps on drawer items are lost when the finger drifts more than 3px on iOSPossibly taken @LanguidSquid claimed this 11 days ago. Openbrowser: Safari component: SwipeableDrawer mobile status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mui/material-ui#49449 ·
Maintainers usually reply within 1 day
-
accessibility
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
mui/material-ui#49415 ·
Maintainers usually reply within 1 day
-
type: new feature waiting for 👍
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mui/material-ui#48254 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
thedevs-network/kutt#1059 ·
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
0. Needs triage 35-feedback bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day