All articlesWhy Does My Site Fail WCAG Color Contrast Checks? Fixing Text, Buttons, and Backgrounds
9 min read

Why Does My Site Fail WCAG Color Contrast Checks? Fixing Text, Buttons, and Backgrounds

Most sites fail WCAG color contrast on buttons, hover states, and gray text — not bad design, just unchecked math. Here's how to find and fix every one.

A WCAG color contrast failure means the ratio between your text (or icon) color and its background doesn't hit the minimum WCAG requires — 4.5:1 for normal text and 3:1 for large text and UI components like buttons. Most sites fail this not because of one bad color choice, but because of dozens of small ones scattered across buttons, placeholder text, and hover states.

If you've run an audit and seen "insufficient color contrast" flagged over and over, you're not alone. According to the WebAIM Million survey — an annual scan of the top million home pages on the web — low contrast text has been the single most common accessibility failure for years running, showing up on roughly 80% of home pages tested. That's not a niche issue. That's nearly every site, including plenty built by teams who think they've already handled accessibility.

What counts as a WCAG color contrast failure?

A failure happens any time the contrast ratio between foreground and background color drops below the threshold set by WCAG Success Criterion 1.4.3 (Contrast Minimum) or 1.4.11 (Non-text Contrast). These aren't suggestions — they're pass/fail checks, measured mathematically, not by eyeballing it.

The ratio is calculated from the relative luminance of both colors, on a scale from 1:1 (identical colors, no contrast at all) to 21:1 (pure black on pure white). WCAG sets different minimums depending on what you're looking at:

  • Normal text needs at least 4.5:1 against its background.
  • Large text (18pt+, or 14pt+ bold) only needs 3:1, since bigger letterforms are easier to distinguish even with less contrast.
  • UI components — button borders, form field outlines, icons that convey meaning — need 3:1 under the newer 1.4.11 rule.

Here's the part people miss: this applies to every state, not just the default. Hover states, focus states, disabled states, placeholder text — all of it gets checked. I've seen plenty of sites pass contrast on the default button and fail completely the moment you hover over it, because someone lightened the background by 15% in a design tool and nobody re-checked the numbers.

What is the 4.5:1 contrast ratio rule, really?

The 4.5:1 ratio is the minimum contrast WCAG 2.1 AA requires for standard body text against its background, and it's the number most ADA color contrast requirements reference when courts or settlement agreements cite WCAG as the compliance standard.

Why 4.5:1 specifically? It's based on research into low-vision readability — people with moderate visual impairments, color blindness, or just aging eyes (contrast sensitivity drops steadily after age 40, for what it's worth) can reliably read text at that ratio under normal lighting. Drop below it and legibility falls off fast, especially on phones in direct sunlight or on cheap monitors with washed-out panels.

A quick gut check: pure black text (#000000) on white (#FFFFFF) gives you 21:1 — way more than needed. Medium gray text (#999999) on white gives you roughly 2.8:1, which fails outright. That's the trap. Gray-on-white text looks clean and modern in a Figma file, and it fails almost every time in a real audit.

Why do buttons fail contrast checks more than body text?

Buttons fail more often because they involve two contrast relationships at once — the text against the button background, and the button itself against the page background — and most design systems only check one of them.

Button contrast accessibility gets overlooked because brand guidelines usually dictate the button color before anyone thinks about text legibility. A pastel blue "Learn More" button with white text might look fine to a sighted designer on a high-end monitor, but run the numbers and it's often sitting around 2.5:1 to 3:1 — well under the 4.5:1 text requirement.

I audited a mid-size e-commerce site last year — a home goods retailer — where every single call-to-action button used white text on a light sage green (#8FA68E-ish). It looked great in the brand book. It failed WCAG 1.4.3 outright, on every page, on every "Add to Cart" button on the site. That's not a minor cosmetic issue; that's the button a customer needs to find in order to buy anything.

The fix usually isn't abandoning the brand color — it's darkening it slightly, or switching to dark text on that background instead of white. Small shift, big difference in pass rate.

How do I check contrast ratios on my own site?

You can check manually with a contrast checker tool — WebAIM's contrast checker is free and widely used, and most browser dev tools (Chrome, Firefox, Edge) now show a contrast ratio directly in the color picker when you inspect an element. Grab the hex codes for your text and background, plug them in, done.

That works fine for spot-checking one button. It falls apart fast once you're dealing with a real site: dozens of pages, dynamic states, color variables pulled from a CSS framework, dark mode toggles. Manually checking every combination on a 40-page site is a half-day project, minimum, and you'll still miss things — hover states especially, since they only render when you're actively interacting with the element.

This is where an automated scan earns its keep. A tool like AccessKnight's free scan crawls your actual rendered pages and flags every contrast failure against the exact WCAG threshold, with the specific hex values and a suggested fix — instead of you tabbing between a color picker and a contrast calculator fifty times in a row.

What about brand colors that just don't pass?

If your brand color fails contrast, you generally have three real options: darken or lighten the color slightly, increase the text weight and size to qualify for the 3:1 large-text threshold, or reserve the brand color for decorative use and keep functional text in a compliant shade.

Most brand teams panic at the idea of "changing the brand color." You usually don't have to. Shifting a color by 10-15% in luminance is often invisible to the average visitor but moves the ratio from failing to passing. Nike's signature orange, for instance, reads totally "on-brand" whether it's a touch lighter or darker — nobody's filing a complaint over a slight luminance shift.

What I tell clients: keep your vibrant brand color for backgrounds, borders, and decorative accents. For anything with text sitting directly on top of it — buttons, banners, alert boxes — use a slightly adjusted version that passes 4.5:1, or flip to dark text instead of white. Most design systems can hold two shades of the same color without looking inconsistent.

How do I fix background and image overlay contrast?

Text placed over photos or gradients fails contrast constantly, because the underlying image varies in brightness across its surface — a headline might sit on a dark patch of sky in one spot and a bright cloud in another.

The fix is almost always a scrim: a semi-transparent dark (or light) overlay between the image and the text, consistent enough that the contrast ratio holds everywhere the text can appear. A common approach is a linear gradient from transparent to roughly 60-70% black behind the bottom third of a hero image, where headline text usually sits.

Don't skip this just because the image "mostly" has good contrast. WCAG doesn't grade on a curve — if there's one zone where text drops below 4.5:1, that's a fail, even if 90% of the image would've passed.

Does dark mode make this worse or better?

Dark mode doesn't inherently help or hurt contrast — it just shifts where the failures happen. Pure white text (#FFFFFF) on pure black (#000000) technically passes at 21:1, but it can cause a halation effect for some users with astigmatism, where bright text seems to "glow" and smear against the dark background.

WCAG doesn't penalize for that directly (it's not currently part of the contrast success criteria), but it's worth considering in your design — many accessibility-conscious teams use an off-white (like #E8E8E8) on near-black rather than true white on true black, for comfort reasons rather than strict compliance.

Where dark mode causes real WCAG failures is in secondary UI elements — disabled buttons, placeholder text, subtle dividers — that get designed in light mode first and then just color-inverted without re-checking the math. A light gray divider at 1.5:1 on white might become a slightly different gray at 1.4:1 on black. Still failing, just failing differently.

Key Takeaways

  • Normal text needs 4.5:1 contrast; large text and UI components (buttons, icons, borders) need 3:1 — these are measured ratios, not opinions.
  • Low contrast text is the most common WCAG failure on the web, found on roughly 80% of home pages per the WebAIM Million survey.
  • Buttons fail more than body text because two contrast relationships are in play — text-on-button and button-on-page — and hover/focus states get checked too.
  • You usually don't need to abandon your brand color — a small luminance shift or a dark-text swap often solves it.
  • Text over photos needs a scrim or overlay to guarantee contrast across the entire image, not just the parts that happen to work.

Frequently Asked Questions

What is the minimum WCAG color contrast ratio?

The minimum is 4.5:1 for normal body text and 3:1 for large text (18pt+, or 14pt+ bold) and UI components like button borders and icons, under WCAG 2.1 Level AA — the standard most ADA-related complaints and settlements reference.

Do button backgrounds need to pass contrast checks too?

Yes. Button text needs 4.5:1 against the button's background color, and under WCAG 1.4.11, the button's border or background also needs at least 3:1 contrast against the surrounding page so users can tell it's a distinct, clickable element.

Is WCAG AAA contrast (7:1) required by law?

No. Most ADA-related legal standards and settlement agreements reference WCAG 2.1 Level AA, which requires 4.5:1 for normal text. The stricter 7:1 ratio is part of Level AAA, which is recommended for some content but not generally required for general compliance.

Can I pass contrast checks and still have an accessibility problem?

Yes. Contrast is one of 33+ checks that make up full WCAG compliance — things like keyboard navigation, alt text, and proper heading structure matter just as much. Passing contrast alone doesn't mean your site is accessible overall.

Does color contrast affect AI search visibility too?

Not directly, but there's overlap. Many of the same structural issues that hurt accessibility — unclear markup, poor semantic structure, content hidden by CSS tricks — also make it harder for AI crawlers like ChatGPT and Perplexity to parse and cite your content. If you're curious how that connects, the AI readability guide breaks down what these crawlers actually need to see.

What tools can check contrast automatically across my whole site?

Browser dev tools and standalone checkers work for single elements, but for a full-site scan that checks every page against all 33 WCAG rules at once — not just contrast — a tool built for that purpose saves hours. Our WCAG fix guide hub covers each rule in detail if you want to understand the full picture before you scan.

Conclusion

Color contrast failures are almost never one bad decision — they're death by a thousand small ones. A gray placeholder here, a pastel button there, a hover state nobody double-checked. Fixing it doesn't require a redesign; it requires going through your actual color pairs with real numbers instead of gut feeling.

Start with your buttons and primary call-to-action elements, since those carry the most functional weight, then work outward to body text and hover states. If you want the full picture across all 33 WCAG rules at once — contrast included — run a free scan at AccessKnight and you'll get the exact hex values failing and the fix for each one, not just a pass/fail grade.

Check your website's accessibility

Scan against all 33 WCAG 2.1 rules and get code-level fix suggestions — free.

Run a free scan →

Keep reading