Skip to content

fix(a11y): lift footer text and card captions to WCAG AA contrast - #126

Merged
jm-rivera merged 1 commit into
fix/motion-kit-style-checksfrom
fix/footer-caption-contrast
Nov 5, 2026
Merged

jm-rivera merged 1 commit into
fix/motion-kit-style-checksfrom
fix/footer-caption-contrast

Conversation

@jm-rivera

@jm-rivera jm-rivera commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Axe on staging reported 18 colour-contrast failures on the home page, all in the footer. Axe measures the footer text against the world-map lines (#5e5e52) that run under it, where the links (#b4b4a6) read 3.13:1 and the column titles (#cdcdb6) 4.07:1. Titles, column links and policy links now use --color-net-light #ececdb: 7.71:1 on the charcoal face and 5.50:1 over the map lines. Hover adds an underline, since the hover colour is now close to the resting one.

Card captions in the default theme were #abb4b7, 2.11:1 on a white card, and the mono theme's muted text and the dark theme's caption also fell short. deriveTheme in src/lib/studio/theme.ts now floors caption and muted at 4.5:1 against the card face in every theme, preset or custom, by mixing the colour toward black or white within its own hue. The default caption stays a cool grey: #727779 on white. ShowcaseCards.tsx derives its theme against its cream face (#f6f6e8, caption #6c7173) instead of overriding --th-card afterwards. The hidden-focus and reduced-motion items of #35 shipped in #106.

Closes #35

Testing: pnpm lint, pnpm lint:css, pnpm typecheck, pnpm test (2284 pass), pnpm build. Axe-core 4.14 on a local build of the home page at 1440 by 900, with reduced motion and default: 0 colour-contrast violations. A new theme test checks every preset and three custom faces with its own WCAG contrast function.

Footer titles and links use net-light #ececdb, 7.71:1 on the charcoal face and 5.50:1 over the world-map lines axe measures them against. deriveTheme now floors caption and muted at 4.5:1 against the card face, darkening within the colour's own hue, so the default caption stays a cool grey (#727779 on white). ShowcaseCards derives its theme against its own cream face instead of overriding --th-card afterwards. axe reports no colour-contrast violations on the home page.

Closes #35
@jm-rivera
jm-rivera added this pull request to stack #127 November 5, 2026 11:00
@jm-rivera
jm-rivera marked this pull request as ready for review November 5, 2026 11:16
@jm-rivera
jm-rivera merged commit 7f17b7f into dev Nov 5, 2026
5 checks passed
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.

home: 27 axe colour-contrast failures, three tabbable buttons inside an aria-hidden layer, and a hero that ignores prefers-reduced-motion

1 participant