Webflow fix

Before and after

Broken — before
<!-- Broken Webflow exported HTML (.text-muted & .w-button) -->
<div class="pricing-card" style="background-color: #ffffff;">
  <div class="card-meta" style="color: #94a3b8; font-size: 14px;">
    Billed monthly · Cancel anytime
  </div>
  <a href="/signup" class="cta-btn w-button" style="background-color: #38bdf8; color: #ffffff;">
    Start Free Trial
  </a>
</div>
Fixed — after
<!-- Fixed Webflow Style Variables (--ink-secondary: #475569, --brand-cta: #0369a1) -->
<div class="pricing-card" style="background-color: #ffffff;">
  <div class="card-meta" style="color: var(--ink-secondary, #475569); font-size: 14px;">
    Billed monthly · Cancel anytime
  </div>
  <a href="/signup" class="cta-btn w-button" style="background-color: var(--brand-cta, #0369a1); color: #ffffff;">
    Start Free Trial
  </a>
</div>
Live preview

Fixed vs. broken example

Passes color-contrastContrast: 7.58:1 body / 5.93:1 CTA (Passes 4.5:1 AA)
Accessibility tree: paragraph "Free shipping..." (#475569 on #ffffff = 7.58:1 PASS AAA) · button "Add to Cart" (#ffffff on #0369a1 = 5.93:1 PASS AA)

Inspect the foreground and background colors in Chrome DevTools Color Picker to verify the live WCAG AA (4.5:1 normal text, 3:1 large text) contrast badges.

Automated test

Playwright + axe-core check

tests/a11y-color-contrast.spec.ts
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";

test("Webflow CMS collection and primary CTA meet WCAG 2.2 AA contrast", async ({ page }) => {
  await page.goto("/case-studies/nordic-roasters");
  const results = await new AxeBuilder({ page })
    .withRules(["color-contrast"])
    .analyze();
  expect(results.violations).toEqual([]);
});

Template deduplication tip

When a Webflow CMS Collection Card uses a low-contrast .card-meta class, every item in /blog/* or /case-studies/* inherits the violation. A11yDrift deduplicates those CMS pages back to one Webflow class fix.

Who this affects

Low-vision readers, older users with presbyopia, people with color-vision deficiencies, and anyone viewing a screen in bright sunlight struggle or fail to read muted gray captions, pale badges, and low-contrast CTA buttons.

NVDA & VoiceOver transcript

Screen readers announce the same copy for both versions; this rule primarily impacts low-vision readers, screen magnifiers, and visual legibility.

NVDA (Windows)

Broken

Screen readers still speak "Free shipping on orders over $75" and "Add to Cart, button", but screen magnifier and low-vision users cannot visually locate or read the faded copy and pale blue button.


Fixed

Screen readers announce "Free shipping on orders over $75" and "Add to Cart, button", while sighted low-vision and ZoomText users clearly distinguish both the 7.58:1 body copy and 5.93:1 CTA.

VoiceOver (macOS / iOS)

Broken

VoiceOver speaks "Add to Cart, button", yet users combining VoiceOver with Zoom or macOS Increase Contrast experience severe glare washout on the 2.14:1 sky-blue fill.


Fixed

VoiceOver speaks "Add to Cart, button", and the 5.93:1 darkened surface stays legible across macOS Zoom, mobile sunlight, and high-brightness displays.

Common questions

How do I fix contrast on Webflow hero sections with CMS background images?
Stack an absolute-positioned dark gradient overlay div (e.g., rgba(15, 23, 42, 0.72)) between the CMS background image and the foreground text wrapper so every editor-uploaded photo maintains >= 4.5:1 contrast.
Does Webflow's built-in Vision Preview replace axe-core contrast testing?
Webflow's color-picker contrast readout and Vision Preview are helpful during design, but they do not scan rendered CMS pages, hover/focus states, or embedded third-party forms like an automated Playwright + axe-core crawl.
Should I update Webflow Variables or individual combo classes?
Always fix the base Color Variable (Variables panel) or base Global Class first so every Webflow Component instance and CMS Collection Page inherits the compliant contrast ratio automatically.