WCAG Encyclopedia

1.4.11 · PerceivableLevel AA

Non-text Contrast

The parts of a control that tell you it is a control — the input’s edge, the checkbox box, the focus ring, the chart key — need 3:1 against whatever sits behind them.

Principle
Perceivable
Guideline
1.4
Level
AA
In WCAG since
2.1
Number
1.4.11

Broken, then fixed

The same interface twice: first with the mistake, then with the smallest change that fixes it.

Broken: The field and checkbox edges vanish; only the placeholder hints anything is editable.

Email address

Email me order updates

Fails: Borders need at least 3:1. This border has 1.1:1.

Fails: Borders need at least 3:1. This border has 1.2:1.

The border is a hair lighter than the surface it sits on. Sighted users with good vision fill in the edge from memory; nobody else can.

Fixed: One border colour, changed on every control at once.

Email address

Email me order updates

Passes: Borders need at least 3:1. This border has 5.4:1.

Passes: Borders need at least 3:1. This border has 4.7:1.

The same layout, the same type, the same spacing. The only change is the border — and now the control announces itself.

What changed in the code

The fix as a diff: removed lines are marked with a minus, added lines with a plus.

Markup diff — styles.css, one declaration
.field,
.checkbox {
removed:   border: 1px solid #EBEBEB;  /* fails 1.4.11 */
added:   border: 1px solid #6A6A6A;  /* passes        */
  border-radius: 4px;
}

Lines are marked - and + as well as tinted, so the diff reads without colour. One declaration fixes every control that shares the class.

How to test

Check your own interface against 1.4.11, one step at a time.

  1. List each control whose edge people need to see to find it: text inputs, checkboxes, radio buttons, switches, and buttons with only an icon.
  2. Measure each edge against the background next to it with the DevTools colour picker or the free Colour Contrast Analyser. It needs at least 3:1.
  3. Check each state that shows by appearance alone: the tick in a checked box, the knob of a switch, the marker under the selected tab. Each needs 3:1 against what is next to it.
  4. Tab through the page and measure the focus indicator of each control against the background around it. It needs 3:1 too.
  5. Find the graphics people need to understand the content, such as icons with no text, chart lines and pie segments, and measure each against its background. Leave out parts whose information is also given in text, such as a pie segment with its value printed on it.
  6. Leave out disabled controls, and controls left in the browser’s default style.

Common questions

Does a button with text need a visible border to pass 1.4.11?

No. When the text shows that it is a button, no edge is needed. A border helps some people, but 1.4.11 does not ask for one.

Does the focus indicator need 3:1 contrast?

Yes. A focus indicator is a visual state of the control, and W3C says it needs 3:1 against the background next to it.

Do disabled controls need 3:1 contrast?

No. Controls people cannot use are exempt, and so are controls whose look the browser sets and the author has not changed.

Try it yourself

A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.

Try it: check your own colours

How to use this lab

  1. Goal. Pick a text colour and a background, and find out whether people can read one on the other.
  2. The controls. The Text colour and Background fields each take a colour from a picker or a hex code, and the Swap text and background colours button swaps them. The preview is drawn in your two colours, and Contrast ratio, the 1–21 scale and the checks show how the pair measures against each threshold. Preview in greyscale shows the preview without colour, and when body text fails, the Use button sets the closest passing text colour.
  3. Try this. The lab starts with near-black text on yellow, which passes easily. Type #999999 in the Text colour hex field and #FFFFFF in the Background hex field, then press the Use button to fix the pair.
  4. What it means. On 1.4.3 and 1.4.1 the verdict line under the lab says whether body text reaches 4.5 : 1, the 1.4.3 level. On 1.4.11 it says whether borders and icons reach 3 : 1. Below that, people with low vision, or anyone on a dim screen, can’t read the text or make out the control.

Pick a text colour and a background. Everything below is drawn in those two colours and measured live.

Text colour
Background
Contrast ratio11.74 : 1

The contrast ratio compares how bright the two colours are. 1 : 1 means the colours are identical, so text in them is invisible; 21 : 1 is black on white, the most there is. The higher the number, the easier it is to read.

On the scale from 1 : 1 to 21 : 1, 11.74 : 1 is at or above 7 : 1: enough for every threshold.

Why the thresholds differ
  • Body text needs 4.5 : 1 (1.4.3, Level AA). That is any text below large size.
  • Large text needs 3 : 1 (1.4.3). Large means at least 24px, or 18.66px and bold. Bigger, heavier letters stay readable with less contrast.
  • At Level AAA, body text needs 7 : 1 (1.4.6), for people with moderately low vision.
  • Borders and icons need 3 : 1 (1.4.11): the edge of a field or checkbox, a focus ring or an icon, against what is next to it. You have to see that they are there, not read them.
  • PassesBody text, AA · 1.4.3Body text needs at least 4.5 : 1. This pair has 11.74 : 1.
  • PassesLarge text, AA · 1.4.3Large text needs at least 3 : 1. This pair has 11.74 : 1.
  • PassesBody text, AAA · 1.4.6Body text at AAA needs at least 7 : 1. This pair has 11.74 : 1.
  • PassesBorders and icons, AA · 1.4.11Borders and icons need at least 3 : 1. This pair has 11.74 : 1.

1.4.11 passes

Open the full colour check

Try it: fade the edges

How to use this lab

  1. Goal. Find how faint the edges of a field and a checkbox can get before people lose them.
  2. The controls. The Fade the edges slider fades the borders of the Email address field and the Email me order updates checkbox towards the white background. “Vision filter” shows the mock in Full colour, in Greyscale, or as seen without red, green or blue cones. Edges against the background gives the contrast ratio, and the check under it says whether it reaches 3 : 1.
  3. Try this. Drag Fade the edges from 0% faded to about 30% faded and watch the ratio drop below 3 : 1. Then try each filter: the edges are grey, so they barely change.
  4. What it means. 1.4.11 passes while the edges have at least 3 : 1 against the background, and fails below that. Fainter edges leave people with low vision unable to see where the field and the checkbox are, so they can’t find them to use them. The verdict line under the lab says which.
Vision filter
Edges against the background5.40 : 1

The contrast ratio compares how bright the two colours are. 1 : 1 means the colours are identical, so text in them is invisible; 21 : 1 is black on white, the most there is. The higher the number, the easier it is to read.

On the scale from 1 : 1 to 21 : 1, 5.40 : 1 is between 4.5 : 1 and 7 : 1: enough for body text at AA, not at AAA.

Why the thresholds differ
  • Body text needs 4.5 : 1 (1.4.3, Level AA). That is any text below large size.
  • Large text needs 3 : 1 (1.4.3). Large means at least 24px, or 18.66px and bold. Bigger, heavier letters stay readable with less contrast.
  • At Level AAA, body text needs 7 : 1 (1.4.6), for people with moderately low vision.
  • Borders and icons need 3 : 1 (1.4.11): the edge of a field or checkbox, a focus ring or an icon, against what is next to it. You have to see that they are there, not read them.
  • PassesBorders and icons, AA · 1.4.11Borders and icons need at least 3 : 1. These edges have 5.40 : 1.

1.4.11 passes

Also in guideline 1.4

Criteria in the same guideline often fail together.