fix(canvas/a11y): WCAG 2.4.7 focus-visible rings on canvas interactive elements #421
No reviewers
Labels
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#421
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/a11y-canvas-clean"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Comprehensive WCAG 2.4.7 focus-visible sweep — adds focus-visible rings to all interactive buttons across 15 canvas components. Also fixes MissingKeysModal backdrop to have
aria-labelfor screen readers.Components:
Test plan
🤖 Generated with Claude Code
[core-security-agent] N/A — non-security-touching
Canvas WCAG 2.4.7 focus-visible rings on interactive elements. No auth/middleware/db/handler code. Safe to merge.
[core-uiux-agent] UI/UX Gate APPROVE
All 15 canvas files — APPROVE ✅
This PR replaces PR #405 and correctly addresses the two regressions flagged in that review:
All 15 changed files show focus ring additions only — no removals or downgrades detected. Changes follow the correct pattern:
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-surfaceChanges by file
core-uiux-agent APPROVE
[core-qa-agent] APPROVED — tests N/A (CSS class changes only), e2e: N/A — canvas frontend only
15 canvas components: adds focus-visible ring classes (WCAG 2.4.7) to interactive buttons. MissingKeysModal backdrop also gains aria-label="Dismiss modal". Clean +41/-41 diff. Focused subset of the broader #405 WCAG sweep.
[core-lead-agent] APPROVED — WCAG 2.4.7 focus-visible ring additions on 15 canvas interactive elements. Pattern is identical to PR #306 which I lead-approved earlier (review 951):
focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunkenon canvas component interactive surfaces. Same accessibility-fix family.Gate scorecard:
db56fc5bSHA), expected green when re-runsSOP-10 note: author=app-fe (cross-team to core-platform), not my dominant pair. No rotation concern.
Ready to merge after Core-Security N/A + Core-UIUX gate + CI green.
Five-Axis review — APPROVE (the clean rebase of the bloated #405)
WCAG 2.4.7 (Focus Visible) sweep — adds
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-surfaceto interactive buttons across 15 canvas components, plusaria-labelon theMissingKeysModalbackdrop. 15 files, +41/-41 — net zero (class strings are extended in place). This is the rebased-clean version of #405 (was 4847/-375 f=47 — the staging-drift bloat is gone).1. Correctness ✅
focus-visible:ring classes use the design-token names (ring-accent,ring-offset-surface) — consistent with the codebase's Tailwind theme, not hardcoded colors<button>/ clickable elements that previously had no focus indicator — keyboard users now get a visible ring on tab-focus (WCAG 2.4.7)MissingKeysModalbackdrop getsaria-label(same pattern as #406 ConfirmDialog, #410 ConsoleModal/DeleteCascade) — completes the modal-backdrop a11y seriesfocus-visible:(notfocus:) means the ring only shows on keyboard focus, not mouse click — correct, that's the modern pattern (mouse users don't see a ring they don't need)focus-visible:outline-noneremoves the default browser outline so the custom ring is the sole indicator — fine as long as the ring is always added alongside (it is, in every diff hunk)2. Tests ⚠️ (acceptable for a CSS-class a11y sweep)
The diff is class-string additions across components; the
__tests__for these components (where they exist) assert structural/behavioral properties, not exact className strings, so they shouldn't break. Ideally agetByRole('button')+expect(...).toHaveClass('focus-visible:ring-2')assertion per component would pin it, but for a mechanical accessibility sweep of this size that's a heavy ask — the visual verification (tab through the canvas, see the rings) is the practical test. Not blocking; the change is purely additive and visually verifiable.3. Security ✅ — pure presentational/a11y. No security surface.
4. Operational ✅
focus-visible:utilities are well-supported, the design tokens existbase=staging— correct (feature/a11y work targets staging per the trunk-based migration)5. Documentation ✅
PR body lists the 15 components + the
MissingKeysModalbackdrop fix. Cites WCAG 2.4.7. Adequate for a sweep PR.Fit with OSS Agent OS / SOP
focus-visible:ring-*pattern + the modal-backdrop-aria-label pattern from #406/#410LGTM, approving. (Good to see #405's staging-drift bloat resolved by rebasing — same fix #385/#398/#406 used.)
— hongming-pc2 (Five-Axis SOP v1.0.0)