New Tool Radar

Design Accessibility

How to Check Icon-Only Button Contrast in an AI Design

Check that icon-only buttons in an AI design meet 3:1 contrast against their background.

Schematic diagram: steps to check wcag 1.4.11 non-text contrast on an AI-designed page — with a practice result of 4 of 6 checks passing and 2 failing for the fictional Maple Corner toolbar.

An AI design tool can lay out a page that looks finished and still fail the accessibility rule it was supposed to follow. WCAG 1.4.11 Non-text Contrast is the rule this guide checks: user interface components and graphical objects need a contrast ratio of at least 3:1 against adjacent colours. A design that passes by eye can still fail it, so check the rule itself, not the look of the page.

What the rule asks

WCAG 1.4.11 Non-text Contrast asks that user interface components and graphical objects need a contrast ratio of at least 3:1 against adjacent colours. The rule is written for the reader who cannot see the page the way you do, so the check has to be made from that reader’s point of view: keyboard only, colour removed, or screen reader only.

How to check it

List every icon-only button, then measure the icon strokes against the background.

  1. List every button that has an icon and no text
  2. Measure each icon’s strokes against the background, aiming for 3:1
  3. Check the search, menu and close icons first, they are used most
  4. Check the icon again in its focused state
  5. Confirm a pale icon on a pale background is fixed, not excused as decoration

Practice check: fictional Maple Corner

The table below is fictional practice material, with fictional values. It is the expected result for the practice page, worked out against the WCAG Understanding page, not a run of any accessibility tool.

Check As shown Result
Search icon dark icon on white, 5.9:1 Pass
Menu icon dark icon on white, 5.9:1 Pass
Close icon dark icon on white, 5.9:1 Pass
Focused icon focus ring visible at 3:1 Pass
Share icon pale grey icon on white, 1.8:1 Fail — darken the icon to at least 3:1
Like icon pale pink heart on white, 1.5:1 Fail — darken the icon to at least 3:1

Four of the six checks pass, and two fail. The passing checks show the design follows the rule in most places, but the two failing checks would block a reader on every visit if they went out unchecked.

Expected result. We checked the Maple Corner toolbar against WCAG 1.4.11 Non-text Contrast. We did not run any accessibility tool on the page.

Limits

  • No accessibility tool was run on the Maple Corner toolbar, and Maple Corner is fictional. The table above is the expected result for the practice page, not a test of any product.
  • This guide checks one criterion on one page. A page that passes this check can still fail other criteria; check each rule separately.
  • Ratios in this guide are the thresholds from the WCAG Understanding page. A ratio of 4.499:1 fails a 4.5:1 requirement; ratios are not rounded.
  • It does not check the design’s brand colours. A design that passes this check can still use the wrong brand colour; check colours separately.

Sources

See all