fix(#92): fix ink-2 and ink-3 contrast to meet WCAG AA across all modes #107

Merged
marcel merged 1 commits from feature/92-fix-secondary-text-contrast into main 2026-03-27 16:05:03 +01:00
Owner

Closes #92
Closes #93

Contrast failures fixed

Token Before After Ratio (worst bg) Status
light ink-2 #6b7280 #4b5563 4.2:1 on canvas → 6.6:1 ✓ AA
light ink-3 #9ca3af #6b7280 2.6:1 on white → 4.8:1 ✓ AA
dark ink-3 #6b7280 #8b97a5 4.0:1 on surface → 6.5:1 ✓ AA
dark ink-2 #9ca3af unchanged 7.5:1 on surface ✓ AAA

One CSS file changed (layout.css) — all token consumers pick up the fix automatically. Both the @media (prefers-color-scheme: dark) and [data-theme='dark'] sections updated.

This also fixes #93 (section labels "FILE", "MORE DETAILS", "OPTIONAL" using text-ink-3 uppercase) since they all consume the ink-3 token. Hardcoded text-gray-400/text-gray-500 bypasses in the enrich pages are addressed separately.

Note on ink-3: light mode ink-3 (#6b7280) passes AA on surface (white, 4.8:1) but is 4.2:1 on canvas (#f0efe9). It should only be used for genuinely decorative/placeholder text on canvas-background screens; all readable secondary text should use ink-2.

Test plan

  • Light mode: secondary text (nav links, metadata labels, filter buttons) is visibly darker than before but not as heavy as primary ink
  • Light mode: section headings ("FILE", "WHO AND WHEN", etc.) are readable — no longer washed out
  • Dark mode: secondary text remains readable, not too bright
  • Run contrast check on any text-ink-2 element in light mode: ≥ 4.5:1
  • Run contrast check on any text-ink-3 element on white surface: ≥ 4.5:1
  • No visual regression on forms, cards, nav, admin tabs
Closes #92 Closes #93 ## Contrast failures fixed | Token | Before | After | Ratio (worst bg) | Status | |---|---|---|---|---| | light `ink-2` | `#6b7280` | `#4b5563` | 4.2:1 on canvas → **6.6:1** | ✓ AA | | light `ink-3` | `#9ca3af` | `#6b7280` | 2.6:1 on white → **4.8:1** | ✓ AA | | dark `ink-3` | `#6b7280` | `#8b97a5` | 4.0:1 on surface → **6.5:1** | ✓ AA | | dark `ink-2` | `#9ca3af` | unchanged | 7.5:1 on surface | ✓ AAA | One CSS file changed (`layout.css`) — all token consumers pick up the fix automatically. Both the `@media (prefers-color-scheme: dark)` and `[data-theme='dark']` sections updated. This also fixes #93 (section labels "FILE", "MORE DETAILS", "OPTIONAL" using `text-ink-3 uppercase`) since they all consume the `ink-3` token. Hardcoded `text-gray-400`/`text-gray-500` bypasses in the enrich pages are addressed separately. **Note on `ink-3`:** light mode ink-3 (`#6b7280`) passes AA on `surface` (white, 4.8:1) but is 4.2:1 on `canvas` (`#f0efe9`). It should only be used for genuinely decorative/placeholder text on canvas-background screens; all readable secondary text should use `ink-2`. ## Test plan - [ ] Light mode: secondary text (nav links, metadata labels, filter buttons) is visibly darker than before but not as heavy as primary `ink` - [ ] Light mode: section headings ("FILE", "WHO AND WHEN", etc.) are readable — no longer washed out - [ ] Dark mode: secondary text remains readable, not too bright - [ ] Run contrast check on any `text-ink-2` element in light mode: ≥ 4.5:1 - [ ] Run contrast check on any `text-ink-3` element on white surface: ≥ 4.5:1 - [ ] No visual regression on forms, cards, nav, admin tabs
marcel added 1 commit 2026-03-27 15:52:20 +01:00
fix(#92): fix ink-2 and ink-3 contrast to meet WCAG AA across all modes
Some checks failed
CI / Unit & Component Tests (push) Successful in 2m35s
CI / Backend Unit Tests (push) Successful in 2m19s
CI / E2E Tests (push) Failing after 26m8s
CI / Unit & Component Tests (pull_request) Successful in 2m30s
CI / Backend Unit Tests (pull_request) Successful in 2m14s
CI / E2E Tests (pull_request) Failing after 25m54s
215f43c0dc
Light mode:
- ink-2 #6b7280 → #4b5563 (gray-600): was 4.2:1 on canvas — now 6.6:1 ✓
- ink-3 #9ca3af → #6b7280 (gray-500): was 2.6:1 on white — now 4.8:1 ✓

Dark mode:
- ink-3 #6b7280 → #8b97a5: was 4.0:1 on dark surface — now 6.5:1 ✓
- ink-2 #9ca3af unchanged (already 7.5:1 — WCAG AAA)

Both the media-query and manual-override dark sections updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel merged commit d053f6dc40 into main 2026-03-27 16:05:03 +01:00
marcel deleted branch feature/92-fix-secondary-text-contrast 2026-03-27 16:05:09 +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#107