Rule

Text contrast

Text must have sufficient contrast against its background.

Rule
color-contrast
WCAG 2.2
1.4.3 Contrast (Minimum) (opens in a new tab) (Level AA)
Severity
Serious

What it checks

Measures the contrast between each piece of text and the background behind it. Normal text needs 4.5:1. Large text needs 3:1: text of 24px or more, or bold text of 18.67px or more, where bold means a weight of 600 or above. Text inside form fields is judged by the control-contrast rule instead.

The measurement uses the colours as they are painted. Opacity on the text or its ancestors, translucent colours and a solid text-shadow outline are all taken into account. Same-origin background images and gradients are sampled, and the text fails only when every sampled part of them falls short. Text that is hidden from screen readers with aria-hidden is still judged, because sighted readers still see it. Text in a disabled control is exempt, as the criterion allows.

When a person decides

Some backgrounds cannot be measured from the page. Text over a cross-origin image, a video, or an image with both light and dark areas is sent for review. So is text under a filter or blend mode, text painted with its background (background-clip: text), text with a shadow that is neither a solid outline nor a faint glow, and text that is exactly the colour of its background. Text that is still waiting for a scroll reveal or a lazy-loaded background is asked about too, since the page may look different once it has loaded.

Example

Fails

<p style="color: #999; background: #fff">Delivery takes three to five working days.</p>

Passes

<p style="color: #595959; background: #fff">Delivery takes three to five working days.</p>

The engine is tested against both examples.

How to fix it

Darken the text or lighten the background, or the reverse on a dark design, until the pair reaches 4.5:1, or 3:1 for large text.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.