Skip to content

[Bug] Widespread WCAG 2.1 AA colour contrast failures across Design System #4652

Open

Description

@chris-gds

Description

Incomplete : #3654

Severity: High / Blocker (Prevents accessible product releases)
Component(s) Affected: Core Colour Palette, Buttons, Typography, Form Fields, Navigation
Specification Targeted: WCAG 2.1 Compliance Level AA

Problem description

A review of the new design system component specs reveals widespread colour contrast failures under WCAG 2.1 Level AA standards. Multiple core colour pairings (text-on-background and UI components) fall below the required contrast ratios, impacting readability for disabled users including those with low vision, colour blindness, or those viewing screens in high-ambient light environments.

Impact

Products built with this design system will fail standard accessibility audits, creating legal liability under the ADA, European Accessibility Act (EAA), and other regional mandates.

Proposed resolution & recommendations

Audit & darken/lighten core tokens

  • Adjust the luminosity of the core brand palette shades to ensure compliant pairings
  • Automate Contrast Checks: integrate a linter or CI/CD check to flag non-compliant colour pairings before they are pushed to the codebase.
  • Hire an accessibility engineer ;)

Screenshots

New badge

Screenshot of the Colour Contrast Analyser app evaluating a light green 'New' badge (#91C889) set against a dark olive background (#686D57) from a UI card titled 'Weekly product highlights. The tool displays a failing contrast ratio of 2.8:1, showing red Fail status icons for WCAG 2.1 AA and AAA text and non-text contrast. In the background, the UI layout includes a landscape banner image and a bottom section featuring a photo of a woman smiling while using a tablet at a desk

Pagination dots (this is also a use of colour fail)

https://astryx.atmeta.com/components/Pagination

Image

Anything else

There are many more but it would take significant time to properly audit. Would recommend a complete review, including for themes too as it would apply.

Reproduction

  1. Open the Design System
  2. Inspect the core UI components
  3. Use an accessibility evaluation tool to test foreground text tokens against their designated background tokens.
  4. Note that a significant portion do not clear the $4.5:1$ threshold.

Astryx Version

@astryxdesign/[email protected]

Environment

Activity

  1. added
    bug
    on Aug 2, 2026
  2. gonzoblasco commented on Aug 2, 2026

    @gonzoblasco
    Contributor

    Did an automated contrast pass on the two components reported. Here are the measurements and proposed fixes:

    1. Pagination dots — two separate failures

    1a. Inactive dot contrast (WCAG 1.4.11 Non-text Contrast)

    The inactive dots use --color-neutral (rgba(5, 54, 89, 0.1) in light, rgba(223, 226, 229, 0.2) in dark) as their background. Because it is translucent, the effective color depends on what is behind it:

    Mode Blended color Against body bg Ratio Needed
    Light #D9E1E7 #F1F4F7 1.20:1 3:1
    Dark #3A3B3C #111112 1.68:1 3:1

    Both fail the 3:1 threshold for non-text UI components.

    1b. Use of color (WCAG 1.4.1 Use of Color)

    The only visual difference between active and inactive dots is a color change (neutral -> accent). There is no secondary cue - no size, shape, border, or text difference. This is a use-of-color violation: users who cannot perceive the color difference have no way to identify the current page.

    Proposed fix:

    • Use --color-text-secondary (#4E606F light / #AAAFB5 dark) for inactive dots instead of --color-neutral. That gives 5.90:1 (light) and 8.55:1 (dark) against body - well above 3:1.
    • Add a secondary non-color cue for the active dot: either a border ring, increased size, or an aria-current="page" visible indicator. The aria-current attribute is already set in the code, but it is not visually styled.

    2. Badge "New" — translucent background on colored surfaces

    The non-semantic badge variants use translucent backgrounds (--color-background-* at 0x33 alpha). On a white surface these all pass comfortably (7-10:1). But when a badge is placed on a colored card background, the translucent fill blends with the card color and the text contrast becomes unpredictable.

    Example with the green variant (--color-background-green = #24BB5E33 + --color-text-green = #09441F):

    Background Blended badge bg Ratio Status
    White #FFFFFF #D3F1DF 9.37:1 Pass
    Body #F1F4F7 #C8E9D8 8.67:1 Pass
    Card from screenshot #686D57 #5A7D58 2.43:1 Fail

    The root cause is that 0x33 (20% opacity) backgrounds were designed for white surfaces, but the design system's own showcase places badges on colored cards. The fix should either:

    1. Increase the alpha to 0x4D (~30%) or higher for non-semantic badge backgrounds, or
    2. Add a @media (forced-colors: active) fallback and document that non-semantic badge variants are only guaranteed on --color-background-surface or --color-background-body, or
    3. For badges on colored surfaces, use the semantic variants (neutral, info, success) which have solid backgrounds and are not affected by the underlying surface.

    Happy to open a PR for the pagination dots fix. The badge issue needs a design decision on whether to bump the alpha or constrain usage.

    cc @chris-gds

  3. self-assigned this
    on Sep 1, 2026
  4. cixzhang commented on Nov 18, 2026

    @cixzhang
    Contributor

    (Posted by Cindy's agent.) Thanks for this thorough review, @chris-gds. Here's where it stands. Some fixes have landed: the focus outline became a theme token (#4973), and component audits added accessibility coverage (for example #6120 and #6247). More contrast fixes are in review now. Text fields, checkboxes and radio boxes get a 3:1 edge (#11658), and tooltip text gets readable contrast in every theme (#12410). We're keeping this open as the tracking issue until the remaining pairings are covered.

  5. gonzoblasco commented on Nov 18, 2026

    @gonzoblasco
    Contributor

    Re-measured by rendering the components (published core, themes built from current main, Chrome via Playwright) after this update, since neither item from my August pass is in the list above.

    1. Pagination dots — unchanged and failing in every configuration

    Theme Inactive light Inactive dark
    Base tokens (no theme) #D9E1E7 on #F1F4F7 — 1.20:1 #3A3B3C on #111112 — 1.68:1
    stone #E4E4EB on #F0F0F7 — 1.12:1 #26262F on #101018 — 1.26:1
    chocolate #F8F2EB on #FFFCF7 — 1.09:1 #2A2524 on #141010 — 1.25:1
    matcha #E5E6D4 on #F0F0E0 — 1.10:1 #23261E on #12140E — 1.21:1

    The active dot clears 3:1 everywhere (4.02:1 on the base dark tokens, 13.45:1 on stone light). The inactive ones do not, in any theme. They render 8×8 (12×12 in matcha) with border: 0 and no outline, so nothing but colour separates them from the surface or from the active dot; aria-checked carries the state for assistive technology only.

    2. Badge — fixed in stone, and still failing on coloured surfaces elsewhere

    Theme On body On a #686D57 card
    Base tokens 8.67:1 2.43:1
    stone 7.19:1 7.19:1
    chocolate 4.78:1 1.24:1
    matcha 4.63:1 1.31:1

    stone now paints a solid tint, so the surface behind it stops mattering. The 20% tints in the base tokens, chocolate and matcha still blend into whatever card they sit on. My August note needs narrowing rather than repeating: the badge failure is now conditional on the theme and the surface; the dots one is not.

    Measurements are computed styles composited through the ancestor backgrounds, not token arithmetic. The base-theme figures reproduce the August numbers exactly (1.20:1 and 2.43:1), which is what made me trust the rest of the pass.

  6. gonzoblasco commented on Nov 19, 2026

    @gonzoblasco
    Contributor

    Update after re-measuring on current main (rendered via Playwright, computed styles composited): the pagination dots still fail 1.4.11 in every theme — 1.09–1.20:1 on light, 1.21–1.68:1 on dark, well under 3:1. Active dot passes everywhere.

    Stone's badge fix (solid tint) solves the badge case for that theme, but base/chocolate/matcha still use the 20% translucent fill that blends into coloured cards (2.43:1 on the reported #686D57 card, down to 1.24:1 in chocolate).

    Happy to open a PR for the dots if you want it — the fix is color-text-secondary for inactive dots + a non-colour cue for the active one (ring/size, aria-current is already there). Let me know if you'd prefer it as one PR for both or split.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions