[material-ui][Alert] - Accessibility Contrast Error
@siriwatknp is already working on this.
Since Jun 13, 2025.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
According to the web accessibility evaluation tool (https://wave.webaim.org/), the filled variants of the warning and info alerts fail accessibility contrast tests.
This screenshot was taken on https://mui.com/material-ui/react-alert/ today, and notes the following issue
Very low contrast (3.85:1) - Very low contrast between text and background colors
The Wave Accessibility Tool addresses some possible fixes for this as follows:
Increase the contrast between the foreground (text) color and the background color. Large text (larger than 18 point or 14 point bold) does not require as much contrast as smaller text.
And some additional information:
Text is present that has a contrast ratio less than 4.5:1, or large text (larger than 18 point or 14 point bold) has a contrast ratio less than 3:1. WCAG requires that page elements have both foreground AND background colors defined (or inherited) that provide sufficient contrast. When text is presented over a background image, the text must have a background color defined (typically in CSS) that provides adequate text contrast when the background image is disabled or unavailable. WAVE does not identify contrast issues in text with CSS transparency, gradients, or filters. WCAG Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.
https://webaim.org/standards/wcag/checklist#sc1.4.3
Search keywords:
Contributor 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.
Assessment
This issue has not been assessed yet.