Skip to content

[P2][a11y] Primary action buttons fail AA — white on accent is 3.22:1 at 12px #703

Closed

Description

@EVWorth

Measured in the running app. Two failures on the default screen, both
theme-independent because both are white text on the brand blue:

element contrast needs
Run (primary action) 3.22 4.5
LIMIT toggle 3.68 4.5

Run is the most-pressed control in the product.

The accent token itself is fine as a foreground — #3b82f6 on the dark
surfaces scores 4.69–5.37. The failure is the inverse: white text on the
accent as a fill, at 12px.

Fix

Darken the accent used as a button fill so white clears 4.5:1, keeping the
lighter value for accent text and borders where it already passes:

--color-accent:      #3b82f6;  /* unchanged: accent text, borders, focus */
--color-accent-fill: #1d4ed8;  /* new: white text on this clears AA */

Splitting the token is the honest fix — one value cannot serve as both a
foreground on dark surfaces and a background under white text. A single
darkened value would make accent text muddier everywhere it currently works.

Alternatively bump the button label to 14px + 600 weight, which lowers the
requirement to 3:1 — but that fights the density the app is otherwise going
for, and 3.22 is uncomfortably close to that line anyway.

Found during the UI review. Same root cause family as #700, different
direction.

Activity

  1. added
    audit
    severity/p2
    kind/a11y
    area/theming
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/themingauditkind/a11yseverity/p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions