WCAG 1.4.11, the non-text contrast rule, asks for at least 3:1 contrast between the parts of a control or graphic that people need to see and the colors next to them. Think of the edge of a text field, the box of a checkbox, a keyboard focus outline, an icon button with no words, or a line in a chart. Level AA, introduced with WCAG 2.1.
Text has its own rule. This one is about everything that is not text but still has to be seen to be understood or used.
Quick facts
Level
AAAdded in
WCAG 2.1, kept in 2.2Ratio
3:1 against the adjacent color or colorsCovers
Control boundaries and states, focus indicators, meaningful icons, chart partsExempt
Disabled controls, unstyled browser controls, logos, photosQuick test
Sample both colors with an eyedropper and check the UI row of a contrast checker
What WCAG 1.4.11 asks for
The rule has two halves. First, controls: anything a person needs to see to know a control is there, or to know its current state, must reach 3:1 against what touches it. Second, graphics: any part of an image or chart that is needed to understand the content must also reach 3:1.
The word "needed" does a lot of work. A text field drawn only as a pale rectangle on a white page relies on that edge, so the edge must pass. A button that shows a clear word such as Search does not depend on its background shape, because the word already tells you it is there; the word itself then falls under the text contrast rules.
Hover effects are not covered. A slightly darker shade when the pointer rests on a button is a nice touch, not a requirement. The states that do count are the ones that tell a person something: focused, checked, selected, pressed, expanded, on or off.
Which parts need 3:1
| Item | The part that must reach 3:1 | Measured against |
|---|---|---|
| Text field | Its border, when the border is the only thing showing the field | The page background and the field fill |
| Checkbox and radio button | The box or circle, and the tick or dot when checked | The background around it |
| Toggle switch | Whatever shows on or off: the knob position, the track color | The colors next to it |
| Keyboard focus outline | The outline itself | The background behind it, and the control if it touches |
| Selected tab | The marker that shows which tab is current | The unselected tab look around it |
| Icon with no visible text | The shapes you need to recognise it | The button or page color |
| Line or bar chart | Lines, bars and pie slices you need to read the data | The chart background and neighbouring slices |
A keyboard focus outline is the ring or highlight that shows which item will react when you press Enter. Its visibility is required by 2.4.7 Focus visible; this rule adds that the visible outline must be strong enough to notice.
What does not need 3:1
- Inactive controls. A disabled button or field can be pale.
- Controls the browser draws. A plain checkbox or select menu that you did not restyle is the browser maker's responsibility. Once you change its colors, it is yours.
- Essential appearance. Logos, flags, photos, screenshots and heat maps where the real colors are the information.
- Graphics with the same information in text. If every value in a chart is also printed as a label or in a table next to it, the faint gridlines do not have to pass.
- Decoration. Background shapes, dividers that only look nice, and illustrations that add mood but no meaning.
Exempt from contrast does not mean exempt from everything. A logo image still needs alt text, and a chart still needs a text alternative under the text alternative rule, 1.1.1.
Who gains from stronger control contrast
People with low vision often cannot find a form field whose border is a whisper of grey. They see a white page with labels floating on it and no place to type. Older users with reduced contrast sensitivity, people on a phone outside in the sun, and anyone with a worn laptop screen meet the same problem. Keyboard users who cannot see a weak focus outline lose track of where they are on the page, and color blind users miss chart lines that differ only in hue.
Testing WCAG non text contrast step by step
- Open the page and list every control, icon only button, focus style and chart.
- Press Tab through the page so you can see each focus outline and state in turn.
- Use the eyedropper in the browser developer tools color picker, or copy colors from the CSS, to get the part color and the adjacent color.
- Enter both into the color contrast checker and read the row for UI parts and graphics.
- Tick, select and switch each control, then measure the checked and selected looks too.
- For charts, test each line or slice against the background and against the slice next to it.
Automated tools rarely test this rule well, because they cannot tell which shapes carry meaning. Plan on doing it by hand.
Failures we find most, and their fixes
| Failure | Ratio | Fix | New ratio |
|---|---|---|---|
Text field border #dddddd | 1.35:1 | Border #767676 | 4.54:1 |
Checkbox outline #cccccc | 1.60:1 | Outline #949494 | 3.03:1 |
Focus outline in pale blue #8ab4f8 | 2.10:1 | Outline #1d4ed8 | 6.70:1 |
Search icon in #aaaaaa | 2.32:1 | Icon #6b6b6b | 5.32:1 |
Chart line in #9ca3af | 2.53:1 | Line #2563eb, plus direct labels | 5.16:1 |
Pale outline Passing outline
#949494 is a handy number to remember: it is about the lightest grey that still reaches 3:1 on white, at 3.03:1. One step lighter, #959595, drops to 2.99:1.
Code: a form field before and after
Fails: a faint border and a pale focus outline.
input { border: 1px solid #dddddd; }
input:focus { outline: 2px solid #8ab4f8; }Passes: the border and outline both clear 3:1 on white.
input { border: 1px solid #767676; }
input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }The small offset leaves a gap of page color between the field and its outline, so the outline is measured against the white page alone and is easy to spot.
Neighbouring rules
- Text contrast (1.4.3): words on buttons and in fields need 4.5:1, dropping to 3:1 when the text is large.
- Color alone (1.4.1): a chart that separates series only by hue fails even if every color passes 3:1; add labels or patterns. See the use of color guide.
- Focus appearance (2.4.13, AAA): a WCAG 2.2 rule that sets a size and 3:1 change for focus indicators at the higher level.
For W3C's own examples, read the W3C explanation of non-text contrast. The WCAG checklist has this rule next to every other AA item.
Questions people ask
What is non text contrast in WCAG?
It is the 3:1 rule for things that are not text: control edges and states, focus outlines, icons and the parts of charts you need to read. It is success criterion 1.4.11 at level AA.
Does a button background need 3:1 against the page?
Not if the button has visible text that already shows it is a button. The text must meet text contrast. If the button is only an icon, the icon shapes need 3:1 against the button or page color.
Do placeholder or hint texts fall under 1.4.11?
No. Placeholder text is text, so it falls under 1.4.3 and needs 4.5:1. The 1.4.11 rule applies to the field border if that border is what shows people where to type.
Is 1.4.11 WCAG required for AA?
Yes. It was added at level AA in WCAG 2.1 and is part of 2.2 AA, so a target of version 2.1 or 2.2 at level AA includes it. WCAG 2.0 AA does not.
Do charts always need 3:1 colors?
Only the parts needed to understand the data. If every value is also printed as a label or a table, the colors can be lighter. Without that, each line, bar or slice must reach 3:1 next to the chart background and next to touching slices.