bug: Dark-theme primary buttons have 3.35:1 text contrast (WCAG AA needs 4.5:1)
Back to our planType
bug
Problem
In the dark theme, buttons that use bg-primary with text-primary-foreground are white on #4e9b76, about 3.35:1, below WCAG AA's 4.5:1 for normal text. Affected: the header Contact button (desktop and mobile menu), the event page Register button, SidebarCTA, and the default Button variant. Hero and CTA-block buttons already pass, because they use bg-primary-dark.
#111 (Phase 1 of #110) acknowledged this and did not fix it. The external review (2026-10-19) asked for it to be tracked explicitly rather than treated as satisfied.
A token-only fix doesn't work. Switching the dark --primary-foreground to the dark background color #0f1117 gives about 5.6:1 on #4e9b76. But the hero's bg-primary-dark (#3d7a5e) then drops to about 3.7:1, and even pure black there is about 4.1:1. The fix needs a per-surface choice.
Proposed fix
- Decide on a dark-theme button treatment, for example a darker fill with white text, or a dark-foreground token used only where the fill is
bg-primary. - Apply it to every
bg-primary+text-primary-foreground/text-whitesurface (grep both). - Visual check at the 6 viewports, both themes.
Acceptance criteria
- Not done: Every button and badge with a
bg-primaryfill has text contrast ≥ 4.5:1 in light and dark themes (measured, values in the PR). - Not done: Hero and CTA buttons still pass in both themes.
Area
frontend, styling, ux
Priority
priority: medium
Generated by Claude Code, opens in a new tab