fix(#147): WCAG AA color-contrast failures in brand palette #149

Merged
marcel merged 4 commits from fix/147-wcag-aa-contrast into main 2026-03-28 19:57:33 +01:00
Owner

Summary

Fixes the two WCAG AA contrast failures identified in #147 (reviewed by Leonie Voss) and re-enables the axe-core color-contrast rule in the E2E accessibility suite.

  • Critical (1.52:1): text-accent was used as a text/label colour — #a1dcd8 is a decorative mint token, not a text colour. Replaced with text-primary (#012851, 16.8:1 on white) across 5 components.
  • High (3.97:1): text-ink/60 produces an opacity-blended colour that fails on the sandy canvas #f0efe9. Replaced with text-ink-2 (#4b5563, 6.6:1 on canvas) across 4 files.
  • Added a ⚠ accent guard comment in layout.css to prevent the misuse from recurring.
  • Added /coverage/ to .prettierignore so generated lcov reports don't fail the lint hook.

Commits

  • test(#147) — Add axe spec with color-contrast enabled (🔴 red)
  • fix(#147) — Replace text-accent with text-primary on all text elements (🟢 green, critical)
  • fix(#147) — Replace text-ink/60 with text-ink-2 + layout.css guard (🟢 green, high)

Test plan

  • Run cd frontend && npx playwright test e2e/accessibility.spec.ts — all 4 pages (home, persons, admin, login) must pass with no color-contrast violations
  • Visually verify admin Users and Groups tables — "Bearbeiten" links now render in navy, not mint
  • Visually verify /persons subtitle and "Neue Person" link — readable at normal brightness
  • Dark mode: no visual regressions (text-primary#a1dcd8 in dark mode, still 8.4:1 on dark surface)

🤖 Generated with Claude Code

## Summary Fixes the two WCAG AA contrast failures identified in #147 (reviewed by Leonie Voss) and re-enables the axe-core `color-contrast` rule in the E2E accessibility suite. - **Critical (1.52:1):** `text-accent` was used as a text/label colour — `#a1dcd8` is a decorative mint token, not a text colour. Replaced with `text-primary` (`#012851`, 16.8:1 on white) across 5 components. - **High (3.97:1):** `text-ink/60` produces an opacity-blended colour that fails on the sandy canvas `#f0efe9`. Replaced with `text-ink-2` (`#4b5563`, 6.6:1 on canvas) across 4 files. - Added a `⚠ accent` guard comment in `layout.css` to prevent the misuse from recurring. - Added `/coverage/` to `.prettierignore` so generated lcov reports don't fail the lint hook. ## Commits - `test(#147)` — Add axe spec with `color-contrast` enabled (🔴 red) - `fix(#147)` — Replace `text-accent` with `text-primary` on all text elements (🟢 green, critical) - `fix(#147)` — Replace `text-ink/60` with `text-ink-2` + layout.css guard (🟢 green, high) ## Test plan - [ ] Run `cd frontend && npx playwright test e2e/accessibility.spec.ts` — all 4 pages (home, persons, admin, login) must pass with no `color-contrast` violations - [ ] Visually verify admin Users and Groups tables — "Bearbeiten" links now render in navy, not mint - [ ] Visually verify `/persons` subtitle and "Neue Person" link — readable at normal brightness - [ ] Dark mode: no visual regressions (`text-primary` → `#a1dcd8` in dark mode, still 8.4:1 on dark surface) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
marcel added 3 commits 2026-03-28 19:30:04 +01:00
Introduces the wcag2a/wcag2aa E2E suite from the test-suite branch with
the color-contrast rule active — no disableRules exclusion. Also adds
/coverage/ to .prettierignore so generated lcov reports don't fail the
lint hook.

This commit intentionally fails the axe suite until the contrast fixes
land in the next commits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
--c-accent (#a1dcd8 light / #00c7b1 dark) is a decorative mint token —
1.52:1 on white, nowhere near WCAG AA. Every place it appeared as the
colour of a text label or interactive button is switched to text-primary
(#012851, 16.8:1 on white) with hover:text-ink-2 for consistency.

Affected: UsersTab, GroupsTab, CommentThread (Reply), DocumentList
(Clear search), PdfViewer (Direkt öffnen link).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(#147): replace text-ink/60 with text-ink-2 and add accent token guard
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Successful in 3m15s
CI / Backend Unit Tests (pull_request) Successful in 2m31s
CI / E2E Tests (pull_request) Failing after 14m47s
e28cd03953
text-ink/60 produces an opacity-blended colour whose contrast is
background-dependent: it passes on white (4.8:1) but fails on the sandy
canvas #f0efe9 (3.97:1, below WCAG AA 4.5:1). Replace every occurrence
with text-ink-2 (#4b5563, 6.6:1 on canvas — WCAG AA ✓).

Also adds a warning comment above --c-accent in layout.css to prevent
the text-accent misuse from recurring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel added 1 commit 2026-03-28 19:51:53 +01:00
chore: resolve merge conflicts with main
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Successful in 2m32s
CI / Backend Unit Tests (pull_request) Failing after 2m17s
CI / E2E Tests (pull_request) Failing after 2h43m0s
CI / Backend Unit Tests (push) Failing after 14m52s
CI / E2E Tests (push) Failing after 3h14m47s
16101240f1
Kept our version of accessibility.spec.ts (color-contrast rule enabled,
exclusion comment removed) over main's disabled version — the contrast
fixes in this branch make the exclusion unnecessary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel merged commit 16101240f1 into main 2026-03-28 19:57:33 +01:00
marcel deleted branch fix/147-wcag-aa-contrast 2026-03-28 19:57:35 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#149