Color Contrast for E-Commerce: WCAG Ratios and the Fixes That Actually Work
Low-contrast text is not a rare or subtle accessibility problem. It’s the single most common one. The WebAIM Million 2026 report, an annual automated scan of the top one million home pages, found low contrast text below WCAG 2 AA thresholds on 83.9% of home pages — up from 79.1% the year before — with an average of 34 distinct low-contrast instances per page. Missing alt text, by comparison, showed up on “only” 53.1% of pages. Contrast is the bigger problem, by a wide margin, and it’s also one of the more mechanically fixable ones.
Quick answer: WCAG 2.1 AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt/24px regular or 14pt/18.5px bold and up), under Success Criterion 1.4.3. A separate rule, SC 1.4.11 (Non-text Contrast), requires 3:1 for the visual boundaries of UI components (buttons, form field borders, focus indicators) and graphical objects needed to understand content. Both are computable — but automated scanners can’t always compute them, particularly for text placed over photos or gradients, which is exactly where e-commerce sites put a lot of text.
This article covers technical accessibility practice, not legal advice — it explains what WCAG 2.1 AA requires for color contrast and how to meet it, not whether a specific site carries legal risk.
What WCAG 2.1 AA actually requires
Two separate success criteria cover contrast, and e-commerce sites tend to run into both:
- SC 1.4.3, Contrast (Minimum): text and images of text need a 4.5:1 contrast ratio against their background. Large-scale text — at least 18 point, or 14 point bold (roughly 24px regular or 18.5px bold) — only needs 3:1, since larger strokes stay legible at lower contrast. Logos and brand names are exempt entirely, as is genuinely decorative or incidental text and text inside inactive (disabled) controls.
- SC 1.4.11, Non-text Contrast: the boundaries of active UI components — button outlines, form field borders, checkbox and toggle states, focus indicators — and graphical objects required to understand content need 3:1 against whatever’s next to them. This one is easy to miss because it’s not about text at all; a checkout button with invisible edges or a focus ring that disappears against a white background both fail it.
Both criteria are explicit that ratios aren’t rounded — the W3C’s own understanding documents give 4.499:1 and 2.999:1 as examples of ratios that fail, even though they look close enough at a glance.
Where automated scanning quietly stops working
Contrast is one of the accessibility checks a scanner should be good at — it’s arithmetic on two colors, not a judgment call like alt text quality. And for solid-color backgrounds, it generally is. The gap shows up in a specific, common case: text placed over an image or gradient.
Looking directly at axe-core’s own contrast-checking logic (the engine behind most free browser-extension scanners) shows why. When the tool can’t resolve a single, computable background color behind a piece of text — because it’s sitting over a photograph, a gradient, or another overlapping element — it doesn’t fail the element. It returns undefined, which axe reports as “Can’t Tell” / needs manual review, not as a violation. The same thing happens for single-character text and for text overlapping large pseudo-element content. None of these show up in a violations count. They show up, if at all, in a separate “incomplete” bucket that a lot of scan summaries don’t surface prominently.
That’s the exact shape of a hero banner headline set over a lifestyle photo, or a “SALE” badge stamped across a product thumbnail — both extremely common e-commerce patterns, and both cases where an automated tool is structurally unable to tell you whether the text actually reads clearly, rather than telling you it doesn’t.
E-commerce patterns that fail this in practice
- Text over hero banners and lifestyle photography. A white headline over a bright product photo can look fine over the sky in the background and disappear over the model’s shirt. Test contrast at the lowest-contrast point the text crosses, not the average — a scrim (a semi-transparent dark overlay behind the text) or a solid-color text band fixes this reliably across the whole image.
- Sale badges and discount tags. Small, bold, colored badges (“20% OFF,” “SALE”) are exactly the large-text case SC 1.4.3 covers, but bright-on-bright color pairs (yellow on white, light pink on white) frequently miss even the relaxed 3:1 large-text threshold, and yellow specifically is a repeat offender against white or light-gray backgrounds.
- Buttons styled to look disabled when they aren’t. WCAG genuinely exempts inactive controls from contrast requirements — a real disabled “Apply” button before a coupon code is entered can be light gray on purpose. The failure is the opposite case: an active, clickable “Add to Cart” or “Checkout” button styled in the same washed-out gray for a “minimal” look. It’s not exempt, because it isn’t actually disabled — it’s a fully working control that looks like it isn’t.
- Focus indicators that disappear. SC 1.4.11, not 1.4.3, governs this: a keyboard user tabbing through a product grid or checkout form needs a visible focus ring with 3:1 contrast against its surroundings. A default browser outline removed by CSS and never replaced (a very common
outline: nonepattern) fails this even if every text color on the page is perfect. - Placeholder text standing in for a real label. Light-gray placeholder text inside search boxes and account forms is real, visible text and has to meet the same 4.5:1 ratio as any other text — it isn’t exempt just because it’s a placeholder, and it disappears entirely once a user starts typing, which is a separate labeling problem beyond contrast alone.
How to actually check it
- Use a contrast checker on the real rendered colors, not the design file — WebAIM’s Contrast Checker and browser DevTools’ built-in color pickers both compute the ratio directly from hex values.
- For text over images, sample the lowest-contrast area the text touches, not a spot chosen because it looks easiest.
- Check every interactive state, not just the default: hover, focus, active, and error states all carry the same contrast requirement as the resting state, and it’s common for a design system to get the default state right and miss the rest.
- Don’t round. 4.4:1 is a fail, not “close enough.”
- Treat “incomplete” scanner results as a to-do list, not a clean bill of health. If a tool flags something as unresolved rather than passing it outright, that’s the item most likely to be a real, unreported problem.
FAQ
Does a passing automated contrast scan mean my site meets SC 1.4.3? Not necessarily. It means every element the scanner could compute a ratio for passed. Elements the tool couldn’t resolve — commonly text over images or gradients — get excluded from that pass/fail count entirely rather than checked and cleared.
What’s the actual ratio for large text? 3:1, for text at least 18pt (≈24px) regular weight, or 14pt (≈18.5px) bold and up. Everything smaller needs 4.5:1.
Are disabled buttons exempt from contrast requirements? Yes, genuinely inactive controls are exempt under SC 1.4.3 and 1.4.11. The common failure isn’t the exemption — it’s applying disabled-looking styling to a button that’s actually clickable.
An automated scan is a starting point, not a finish line
The same gap that shows up here — a real, common failure that a scanner reports as “can’t tell” instead of catching — is why Quietramp’s audits pair automated scanning with a manual pass: a person actually looking at rendered pages, checking exactly the hero-banner and badge-overlay cases scanners structurally can’t resolve. See a real sample report or check pricing — $890 one-time, $99/month for ongoing re-checks after fixes ship.
This is educational content about technical accessibility practice, not legal advice. Meeting WCAG 2.1 AA does not guarantee legal compliance with the ADA or any other law. Consult qualified counsel for legal risk questions.
This article was drafted with AI assistance and reviewed by a person for accuracy before publication.