- Level
- AA
- Since
- WCAG 2.1
- Entries
- 53 / 193
1.4.11 Non-text Contrast
The parts of a control or a graphic that are needed to recognise and understand it have to stand out from what is next to them by at least 3:1.
/ What it requires
Text is not the only thing a visitor has to see. The outline of an input, the tick in a checkbox, the ring that shows keyboard focus, a magnifying glass that stands for search and the lines of a chart all carry information without a single letter. If they blend into the background, somebody with low vision cannot tell where a field is, whether an option is selected, or which line on the chart belongs to which series.
The criterion asks for a contrast ratio of at least 3:1 against adjacent colours for two things: the visual information needed to identify a user interface component and its states, and the parts of a graphic needed to understand it. Inactive components are exempt, and so are controls whose appearance comes from the browser and has not been changed by the author. Graphics are exempt where a particular presentation is essential, as with logos, flags, photographs and heat maps. Text is covered by 1.4.3 instead.
/ How pages fail it
- Text fields are outlined in a pale grey such as #cccccc on white, which is about 1.6:1.
- A custom checkbox or radio button shows its checked state in a colour barely different from its unchecked state.
- The focus indicator is restyled to a thin, faint line that does not reach 3:1 against the surface around it.
- Icons that work as buttons with no text label are drawn in a light tint.
- The lines or segments of a chart are too close in tone to the background or to each other to be told apart.
/ How to check it yourself
- Pick the border colour of each input, select and custom control with the eyedropper in the developer tools or in the Colour Contrast Analyser, and compare it with the colour directly beside it.
- Tab through the page and measure the focus ring against the background it is drawn on.
- Switch checkboxes, radio buttons, toggles and tabs on and off, and measure what marks the selected state.
- Find icons that stand alone without text and measure each icon against its surface.
- In charts, measure each line or segment against the background and against its neighbours, unless labels carry the same information.
/ How to fix it
- Set border-color on input, select and textarea to a colour of at least 3:1 against the page. On white, #949494 is about the lightest grey that reaches it.
- Style the focus state with outline, for example outline: 2px solid in a colour that reaches 3:1, and add outline-offset so the ring sits clear of the control.
- Draw the checked state of custom checkboxes and switches with a fill and a mark that both reach 3:1 against their surroundings.
- Colour icons through fill or stroke with currentColor, on a parent that already has a colour with enough contrast.
- In charts, separate segments with a border in the background colour and label the data directly.
/ What our scanner checks
The rendered pass takes visible, enabled fields, buttons and elements with a button, checkbox or switch role. Where one draws a border, it blends the top border colour over the background behind it and reports anything under 3:1. Controls on an image or gradient are skipped. Icons, charts, focus rings and checked states are not measured, and a filled button with a faint border may be flagged.
/ Who fails it, in our own measurements
One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.
/ Questions about this criterion
Do input borders need a 3:1 contrast ratio?
When the border is what tells a visitor that a field is there, yes. The boundary of a text input is visual information needed to identify the control, so it has to reach 3:1 against the colour next to it. A field identified in another way that meets 3:1, such as a fill that stands out clearly from the page, does not also need a contrasting border.
Does 1.4.11 apply to disabled buttons and default browser controls?
No to both. The criterion exempts inactive components, so a disabled button may be faint. It also exempts components whose appearance is determined by the browser and not modified by the author, such as an unstyled checkbox. As soon as a stylesheet changes the look of a control, its borders, states and focus indicator have to reach 3:1.
Do icons have to meet contrast requirements?
An icon that is needed to understand the content or to operate a control has to reach 3:1 against its background. That covers a standalone search or menu icon and the symbols in a chart legend. An icon that sits beside a text label saying the same thing is not needed for understanding, and neither is pure decoration. Logos are exempt.
