fix(web): .btn--secondary text on --surface fails contrast under the dark palette (1.8:1)
Summary
components.css paints .btn--secondary as color: var(--primary) on background: var(--surface). Under the Simple Statehouse dark palette that is #1d4a7d on #16202e — 1.81:1 measured by axe (WCAG AA needs 4.5:1); the same token as text on --page (#0e1722) is 1.99:1. The dark --primary is a fill blue designed to carry --on-primary white text (9.0:1), not to be text itself; the palette's dark text ink for interactive elements is --link (#8fb3e0: 7.6:1 on the surface, 8.3:1 on the page).
craig-web's own accessibility audits run its pages in the default scheme only (the dark / high-contrast passes cover the intake edge), so this never surfaced there. The craig-portal shell audits every page in dark and hit it on its two secondary buttons; U5 (#1846 (closed)) carries a portal-local override in portal.css and leaves the shared stylesheet alone.
Acceptance criteria
-
.btn--secondary(and any other component using--primaryas TEXT on--surface/--page) reads ≥ 4.5:1 underprefers-color-scheme: darkfor the shipped palettes — either a dark-scheme rule incomponents.cssswitching the text/border to--link, or a dedicated--primary-inkrole token in the palette schema (ADR-036) with the dark value tuned for text - The craig-web accessibility audit runs at least one page carrying a secondary button under the dark and high-contrast-dark emulations, so the regression is guarded where the component lives
- The portal-local override in
services/craig-portal/static/css/portal.cssis retired once the shared fix lands (fold into #1867 (closed)'s stylesheet lift if that ships first)
Context
- Measured in the U5 portal e2e (axe
color-contrast, 2026-09-14):.portal-header__actionand the language-formbuttonat 1.81:1; the anonymous landing's language links at 1.99:1 - Palette values:
crates/craig-state-bundle/theme/simple-statehouse.toml[color.dark]; the HC-dark section overrides only the semantic triad, so the figures hold underprefers-contrast: moreas well - Related: #1867 (closed) (lift shared BFF stylesheets into craig-bff)