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.
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
Related guides
Frequently asked questions
What counts as an adjacent color?
Do icons need 3:1 contrast?
Does a disabled button need to meet contrast?
Do focus rings need 3:1 contrast?
Related tools
Color Picker
Pick colors, convert between HEX, RGB, HSL, HSV, OKLCH and CMYK, and find the nearest CSS and Tailwind color.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolAspect Ratio Visualizer
Visually compare width differences between 16:9, 21:9, and 32:9 monitors.
Use tool