Skip to content

Commit 739160c

Browse files
edenoclaude
andcommitted
feat(a11y): continuous Axe checks, global keyboard shortcuts, contrast audit
M12 accessibility hardening of the workspace UI: - jest-axe (dev dep) wired suite-wide; axe-a11y.test.jsx renders every route (Home, Workspace, AnimalEditor, ValidationSummary, DayEditor ×5 steps) with a configured-workspace fixture and asserts zero violations. Fixed two real findings: <aside role="navigation"> -> <nav>, and an empty-state heading-order jump (h3->h2). - useGlobalShortcuts (mounted in AppLayout): Ctrl/Cmd+S save (always preventDefaults the browser dialog), Alt+Arrow step nav, Alt+N context add, ? help; suppressed while typing or a modal is open. Step nav/add bridge to the active stepper via a window event (stepperShortcuts). ShortcutsHelp dialog on the shared Modal + labelled header trigger. - AnimalEditorStepper aria-live step announcer; >=44px targets on new buttons. - Contrast: raised shared tokens to WCAG AA (--color-primary #2196f3->#1565c0, --color-warning ->#bf360c, --color-error ->#c62828); contrast.test.js parses the tokens and guards AA. - saveNow flush added to store persistence (for Ctrl+S); public-API key list updated. - Un-skipped the nested electrode-group keyboard-navigation test. - makeConfiguredWorkspace fixture. No YAML/schema/gating change; golden baselines 125/125. Full suite 3001 passed / 0 skipped (previously 1 skipped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a5ffad3 commit 739160c

33 files changed

Lines changed: 1250 additions & 61 deletions

‎docs/REFACTOR_CHANGELOG.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,45 @@
66

77
---
88

9+
## Continuous accessibility & keyboard shortcuts (June 4, 2026) ✅ COMPLETE
10+
11+
### Summary
12+
13+
Hardens the workspace UI for accessibility: continuous automated Axe checks across
14+
every route, global keyboard shortcuts with a discoverable help dialog, a color-token
15+
contrast audit, and a deeper ARIA / tab-order / status pass.
16+
17+
### Changes
18+
19+
- **Automated Axe in CI.** `jest-axe` (dev dependency) runs inside the Vitest/jsdom
20+
integration lane: `axe-a11y.test.jsx` renders every route — Home, AnimalWorkspace,
21+
AnimalEditor, ValidationSummary, and the DayEditor at each of its five steps — with a
22+
fully-configured workspace fixture and asserts zero violations. `toHaveNoViolations`
23+
is wired suite-wide. Two real violations found and fixed: `<aside role="navigation">`
24+
(role not allowed on `<aside>`) became `<nav>`, and an empty-state heading-order jump
25+
(`h3`→`h2`).
26+
- **Global keyboard shortcuts** (`useGlobalShortcuts`, mounted once in AppLayout):
27+
Ctrl/Cmd+S (save — always suppresses the browser dialog), Alt+→ / Alt+← (next /
28+
previous stepper step), Alt+N (context add, e.g. open the add-task dialog on the
29+
Epochs step), and `?` (open help). Shortcuts are suppressed while typing in a field or
30+
while a modal is open. Step navigation / add are broadcast to the active stepper via a
31+
small window-event bridge (`stepperShortcuts`).
32+
- **Discoverable shortcuts help** (`ShortcutsHelp`, on the shared `<Modal>`): opened by
33+
`?` and by a labelled header trigger ("Keyboard shortcuts"); Esc closes.
34+
- **ARIA / tab-order pass:** AnimalEditorStepper gains an `aria-live` step-change
35+
announcer; ≥44px target sizing on new action buttons; verified one `main` + one
36+
labelled `navigation` and a single `aria-current="step"` per route.
37+
- **Color-contrast audit + guard.** Raised the shared tokens to WCAG AA — `--color-primary`
38+
`#2196f3`→`#1565c0` (was 3.12:1 with white text), `--color-warning` `#d84315`→`#bf360c`,
39+
`--color-error` `#d32f2f`→`#c62828`. `contrast.test.js` parses the tokens from
40+
`index.css` and asserts every audited pair meets AA, so a future regression fails a test.
41+
- **Un-skipped** the nested electrode-group keyboard-navigation test (the configured
42+
workspace fixture removed the old state blocker).
43+
- No change to YAML output, schema, or `isExportEnabled`; golden baselines stay
44+
byte-identical.
45+
46+
---
47+
948
## Probe reconfiguration wizard (June 3, 2026) ✅ COMPLETE
1049

1150
### Summary

0 commit comments

Comments
 (0)