Skip to content

fix(a11y): accent.onFill token — white-text-on-accent-fill meets AA (12.17)#83

Merged
th3-br41n merged 1 commit into
mainfrom
feat/a11y-accent-onfill
Jul 3, 2026
Merged

fix(a11y): accent.onFill token — white-text-on-accent-fill meets AA (12.17)#83
th3-br41n merged 1 commit into
mainfrom
feat/a11y-accent-onfill

Conversation

@th3-br41n

Copy link
Copy Markdown
Contributor

Closes the one known-deferred contrast pair from #82 (12.16): white accent.text ON the light accent FILL (membership badges, highlight tiles) measured ~3.6–3.9:1 in default-light / solar / mint. The theme-contrast ratchet is now green with zero deferrals across all 12 themes.

The fix

A dedicated color.accent.onFill token — the accent FILL that carries accent.text:

  • = each theme's accent.strong in the 3 failing light themes (white on strong clears AA: 4.92 / 5.18 / 5.47), = accent.default everywhere else. Per-theme by necessity — a global accent.default→strong swap breaks nord/aurora (their dark accent.text on the darker strong). In the 9 non-failing themes onFill == default, so no visual change there; only the 3 light badges get the theme's darker accent.
  • 9 accent-fill-with-text sites repointed background--color-accent-on-fill (membership badges, entity-fallback action, welcome tiles, filled icon-button hover, notif badge). Gloss button faces, gradients, decorative dots, and accent-subtle tints correctly left alone.
  • Ratchet: the accent-text-on-accent pair now tests accent.text on accent.onFill (the fill that actually carries the text); KNOWN_DEFERRED removed.

Pairs with #82 to complete the accent a11y story: accent.onSurface (accent as text) + accent.onFill (text on accent fill), both AA-enforced.

Verified

526 tokens/sdk-types tests + the 12-theme ratchet green (zero deferrals); tsc + lint (incl. the phantom-CSS-token checker) clean; full suite green (the one flaky beforeEach timeout passes 12/12 in isolation).

🤖 Generated with Claude Code

…12.17)

The inverse of 12.16's accent-as-text fix: white `accent.text` ON the light
accent FILL (membership badges, highlight tiles) measured ~3.6–3.9:1 (under AA
4.5:1) in default-light / solar / mint — 12.16 tracked it as the one known-
deferred pair. This closes it.

- **New `color.accent.onFill` token** in all 12 themes: the accent FILL that
  carries `accent.text`. = each theme's `accent.strong` in the 3 failing light
  themes (white on strong clears 4.5: 4.92/5.18/5.47) and = `accent.default`
  elsewhere — a global default→strong swap can't work (breaks nord/aurora's dark
  `accent.text` on the darker strong), which is why it's per-theme. In the 9
  non-failing themes onFill == default, so no visual change there; only the 3
  light badges get the theme's darker accent. (+ CANONICAL_TOKEN_NAMES mirror.)
- **9 accent-fill-with-text sites** repointed `background` → `--color-accent-on-fill`
  (membership badges, entity-fallback action, welcome tiles, filled icon-button
  hover, notif badge); gloss button faces, gradients, decorative dots, and
  accent-subtle tints correctly left alone.
- **Ratchet**: the `accent-text-on-accent` pair now tests `accent.text` on
  `accent.onFill` (the fill that actually carries the text); KNOWN_DEFERRED
  removed — the theme-contrast ratchet is now GREEN with **zero deferrals**
  across all 12 themes.

526 tokens/sdk-types tests + the 12-theme ratchet green; tsc + lint (incl. the
phantom-CSS-token checker) clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@th3-br41n th3-br41n merged commit 32d8af2 into main Jul 3, 2026
2 of 3 checks passed
@th3-br41n th3-br41n deleted the feat/a11y-accent-onfill branch July 3, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant