Focus ring is under 3:1 contrast in both themes #1737

Closed
opened 2026-11-02 04:12:30 +00:00 by sam · 1 comment
Owner

Shared components in ui/src/components/ui (Button and about 23 others) use outline-none with focus-visible:ring-ring/50. The utility overrides the :focus-visible floor in ui/src/style.css, so the visible ring is --ring at 50% opacity.

Measured: 2.1:1 on the light card (#2e795a at 50% on white) and 2.4:1 on the dark card (#51a580 at 50% on #1c1d21). WCAG 2.4.11/1.4.11 needs 3:1. At full strength the ring is 5.3:1 and 5.7:1.

Done when: focus rings use ring-ring at full strength (or the base outline), and a keyboard pass shows a ring of at least 3:1 on every focusable control.

Shared components in `ui/src/components/ui` (Button and about 23 others) use `outline-none` with `focus-visible:ring-ring/50`. The utility overrides the `:focus-visible` floor in `ui/src/style.css`, so the visible ring is `--ring` at 50% opacity. Measured: 2.1:1 on the light card (`#2e795a` at 50% on white) and 2.4:1 on the dark card (`#51a580` at 50% on `#1c1d21`). WCAG 2.4.11/1.4.11 needs 3:1. At full strength the ring is 5.3:1 and 5.7:1. Done when: focus rings use `ring-ring` at full strength (or the base outline), and a keyboard pass shows a ring of at least 3:1 on every focusable control.
sam added the highbug labels 2026-11-02 04:12:30 +00:00
sam self-assigned this 2026-11-02 04:12:30 +00:00
Author
Owner

Fixed in d3fbb084. Every focus indicator now renders at full strength: all 24 focus-visible:ring-ring/50, the expanded step node's ring-ring/60, and the base outline-ring/50 in style.css became ring-ring/outline-ring, so the visible ring is the same full-strength --ring the :focus-visible outline floor already uses (5.3:1 on light, 5.7:1 on dark, per the measurements in the issue; both above the 3:1 WCAG 2.4.11/1.4.11 requires). 26 files, one token each. Verified: task check (fmt, lint, vet, build, go test, ui build + tests) passed on the committed tree. The in-browser keyboard pass is not part of the gate — worth a manual Tab-through when convenient.

Fixed in d3fbb084. Every focus indicator now renders at full strength: all 24 focus-visible:ring-ring/50, the expanded step node's ring-ring/60, and the base outline-ring/50 in style.css became ring-ring/outline-ring, so the visible ring is the same full-strength --ring the :focus-visible outline floor already uses (5.3:1 on light, 5.7:1 on dark, per the measurements in the issue; both above the 3:1 WCAG 2.4.11/1.4.11 requires). 26 files, one token each. Verified: task check (fmt, lint, vet, build, go test, ui build + tests) passed on the committed tree. The in-browser keyboard pass is not part of the gate — worth a manual Tab-through when convenient.
sam closed this issue 2026-11-06 11:34:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1737