Skip to content

theme: the dark palette's measured set omits surface-hover and the tint washes, so adopting it fails axe at 12px #74

Description

@krisarmstrong

Raised from seed#2693, where adopting the canonical theme turned Storybook interactions and accessibility red with 37 axe color-contrast violations. The palette's header records its dark pairs as "text 4.5:1 or better, UI edges 3:1 or better", and each token's comment gives its ratio on base and on raised. Two surfaces products actually use are not in that set:

pairing measured needed
--color-text-muted #91896e on --color-surface-hover #312e25 3.88:1 4.5:1
bg-status-success/20 wash under text-status-success (#3cb46e), 12px 4.37:1 4.5:1
bg-cat-1/20 wash under text-cat-1 (#60a5fa), 12px 4.49:1 4.5:1

The hover surface is where list rows, chips and command-palette items put their small text; the bg-<hue>/NN wash under same-hue text is the fleet's standard status pill. Both are in every product's markup, so all four repos will meet this as they adopt (UI-SEED-7 / UI-STEM-7 / UI-NIAC-9 / UI-TRL-8).

Seed fixed it in its own markup (same-hue pills to /15 — 4.80 and 4.95:1 — and the affected chips from muted to secondary, 5.97:1), because a product-local edit to msn-shared.css cannot pass the hash gate. That works, but it is the same fix three more times unless the canonical side decides it:

  1. extend the measured set to surface-hover (and any other surface the component layer paints), adjusting --color-text-muted in dark until it clears 4.5:1 there; and
  2. state the supported tint recipe — either the canonical component layer owns a .status-pill with a wash that clears 4.5:1 at 12px, or the tokens document the alpha that does (/15, not /20, for the current hues).

Method: axe via the Storybook a11y gate, ratios recomputed with the WCAG relative-luminance formula against the composited background.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions