Do buttons, icons and input borders need 3:1 contrast? The WCAG non-text rule

By TechCompare · Updated · How we check

Yes, but only when a border, icon or glyph is the only visual cue that identifies the control. A button with a text label still has to meet the text rules for that label.

Controls depend on more than text. A search icon, a checkbox or the outline of a text field can be the only thing that shows someone where to act. WCAG covers those visual parts under its own non-text rule, which uses a 3:1 bar and has a few exceptions worth knowing.

Rule
WCAG AA UI parts
Non-text contrast (3:1+)
Example ratio
3.5:1
#8A8A8A on #FFFFFF
Category
WCAG Rules
Accessibility knowledge base

How this is calculated

Success Criterion 1.4.11 asks that "Visual information required to identify user interface components and states" have at least 3:1 against adjacent colors. The Understanding page narrows that: a visual boundary around a control "is only required when there is no other visual way to identify the presence of the control." So a text field with nothing but a thin outline needs that outline at 3:1, while a button with a clear text label doesn't need an edge for this rule. The same page says "the computed values should not be rounded" and gives the example "2.999:1 would not meet the 3:1 threshold." When a result sits near 3:1, read the unrounded value before you decide, since a figure that rounds up to the threshold can still fall short.

Here are the pairs on white. An input border in #8A8A8A gives 3.45:1, and it passes the 3:1 bar. The border #CCCCCC gives 1.61:1, and that fails 3:1, so it can't be the only mark on the field. An icon-only button glyph in #A0A0A0 gives 2.61:1, and that misses 3:1 for a glyph that carries the meaning. A solid button is a separate case. If its fill is the only cue, #2563EB on white gives 5.17:1, and that meets the 3:1 rule for the fill. Its white label is text, so it's held to the text rule: 5.17:1, and that passes 4.5:1. The text says the rule applies "except for inactive components," and decorative graphics need nothing. Logos are exempt too, though if a logo works as a link or control, the Understanding page encourages a higher-contrast version.

Verdict

Before you change a border or icon color, ask whether the control would still be clear without it. If it wouldn't, that part needs 3:1. #8A8A8A fails 4.5:1 as text, so keep it on outlines and off label copy.

More Contrast scenarios

Frequently asked questions

What counts as an adjacent color?
It's the color a part touches or sits against. For a border, that's usually the page or the field behind it. For an icon, it's the button surface around the glyph. WCAG measures the part against that neighbor, not against the whole screen.
Do icons need 3:1 contrast?
Only icons that carry meaning. An icon-only button needs its glyph at 3:1 against the button's background, because nothing else identifies it. A decorative star or background flourish needs nothing. An icon beside a text label usually isn't the only cue, so the label does the identifying.
Does a disabled button need to meet contrast?
No, if the button is truly inactive, such as a disabled button in HTML. The exemption covers inactive components, so its label and edges aren't held to the rule. A button that only looks disabled but still responds to clicks is different. The placeholder and disabled text guide explains where that line sits.
Do focus rings need 3:1 contrast?
Yes. The Understanding page says a component's visual focus indicator "must have sufficient contrast against the adjacent background when the component is focused," and its passing example is a gray #949494 indicator on white. Computed, that gray gives 3.03:1, and that passes 3:1.