WCAG & Testing
WCAG Color Contrast Requirements in Plain English
Low-contrast text is the most commonly detected accessibility failure in WebAIM's yearly scan of one million home pages, and one of the easiest to prevent. The rule is arithmetic, not taste: normal text needs a contrast ratio of at least 4.5:1 against its background, and large text needs 3:1.
Sources
- 1What are the WCAG color contrast requirements exactly?
- 2Which parts of a page other than text need contrast?
- 3Where does contrast usually break on a government site?
- 4How should a team handle contrast before a deadline?
- 5How is a contrast ratio calculated?
- 6What about text sitting on images?
- 7Questions people ask
Key takeaways
- 4.5:1 for normal text is success criterion 1.4.3, Level AA.
- 3:1 for large text: 18pt and over, or 14pt and over when bold.
- 3:1 for the non-text parts too: button borders, form field outlines, focus rings and meaningful icons, under 1.4.11.
- Text contrast is largely machine-testable: scanners check it more reliably than most criteria, though text over images or gradients still needs a person to look.
What are the WCAG color contrast requirements exactly?
Success criterion 1.4.3 Contrast (Minimum) requires 4.5:1 for normal text and 3:1 for large text. Large means at least 18 point, or at least 14 point if the text is bold. Logotypes and text that is purely decorative are exempt, as is text in an inactive control.
In detail
The ratio compares the relative luminance of the two colors, so it is not the same as how different they look to you on a bright monitor. Light gray on white is the classic failure: it reads as tasteful restraint in a design review and fails the arithmetic. Placeholder text inside form fields often fails for the same reason.
Which parts of a page other than text need contrast?
Criterion 1.4.11 Non-text Contrast requires 3:1 for the visual information needed to identify a control or its state, and for parts of graphics you need in order to understand them. In practice that means the outline of a text input, the edge of a button, the focus indicator that shows where the keyboard is, a required-field marker, and the slices of a chart that carry meaning.
In detail
Focus indicators are the one people forget. A keyboard user who cannot see which element is focused is navigating blind, and a faint outline in a pale color can fail both the criterion and the user. The related criterion 1.4.1 Use of Color adds that color must not be the only visual means of conveying information, so a form that marks errors in red alone fails even if the red passes contrast.
Where does contrast usually break on a government site?
Four places, in our experience. Pale placeholder text in search and form fields. Light gray helper text under inputs and in footers. Brand colors used for body links, where a mid-tone blue or orange passes against white in the designer's eye but not in the arithmetic. And status badges, where white text sits on a brand yellow or light green.
In detail
There is a planning trap worth naming. Contrast failures usually live in a theme or a design system rather than in a page, so one fix can clear hundreds of findings at once, and one theme update can bring them all back. That is the regression pattern monthly monitoring exists to catch, and it is why a single pre-deadline audit tends to age badly.
How should a team handle contrast before a deadline?
Fix it at the source. Decide the accessible values once, record them as the official palette with their ratios written down, and have every new component checked against that palette rather than against somebody's judgment. Then test the live pages, because a palette that is correct on paper still fails where a component overrides it.
Contrast criteria 1.4.3 and 1.4.11 appear in the full WCAG 2.1 AA checklist, which covers all 50 Level A and AA success criteria, and contrast is checked in every initial assessment.
How is a contrast ratio calculated?
From the relative luminance of the two colours, not from how different they look. It is arithmetic, which is why a tool settles it outright and an opinion does not.
In detail
Each colour is converted to a luminance value, and the ratio is the lighter value plus 0.05 divided by the darker value plus 0.05. The result runs from 1:1 for two identical colours to 21:1 for black on white. Two consequences catch designers out. Hue barely matters, so a red and a green that feel strongly different can sit at a poor ratio, while two greys that look similar can pass. And the ratio is symmetrical, so swapping foreground and background changes nothing. This is also why contrast is one of the few criteria where a scanner is more reliable than a person: it is measuring, not judging.
What about text sitting on images?
It still has to meet the ratio, measured against whatever is actually behind each letter. A hero banner with white text over a photograph is the usual failure, because the photograph is not one colour.
In detail
Text over a photo has to clear the threshold at its worst point, not its average. A caption that passes over the dark half of an image and fails over the bright sky has failed. The fixes are ordinary: a solid or gradient scrim between the image and the text, a text panel sitting beside the image rather than on it, or choosing images with a quiet area reserved for type. The same applies to text over video, where the background changes frame by frame and the only safe approach is a solid backing. Automated scanners often cannot resolve these cases, so they appear in a report as a check needing human confirmation.
Questions people ask
What are the contrast ratios exactly?
Success criterion 1.4.3 Contrast (Minimum) requires 4.5:1 for normal text and 3:1 for large text. Large means at least 18 point, or at least 14 point if the text is bold.
What is exempt from the text contrast rule?
Logotypes, text that is purely decorative, and text in an inactive control.
Which parts of a page other than text need contrast?
Criterion 1.4.11 Non-text Contrast requires 3:1 for the visual information needed to identify a control or its state, and for the parts of a graphic you need in order to understand it: the outline of a text input, the edge of a button, the focus indicator, a required-field marker, and the slices of a chart that carry meaning.
How is a contrast ratio calculated?
From the relative luminance of the two colours. Each colour is converted to a luminance value, and the ratio is the lighter value plus 0.05 divided by the darker value plus 0.05, running from 1:1 for two identical colours to 21:1 for black on white. Hue barely matters, and the ratio is symmetrical, so swapping foreground and background changes nothing.
Does passing contrast mean colour use is fine?
No. Criterion 1.4.1 Use of Color adds that colour must not be the only visual means of conveying information, so a form that marks errors in red alone fails even when the red passes contrast.
What about text sitting on an image?
It still has to meet the ratio, measured against whatever is actually behind each letter, and it has to clear the threshold at its worst point rather than its average. Automated scanners often cannot resolve these cases, so they appear in a report as a check needing human confirmation.