mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-07-02 12:51:44 +00:00
69fba8032d
## Summary Closes #1706. Expands the axe-core a11y CI gate (`test-a11y-axe-1668.js`) to cover the 7 missing analytics tabs plus the `prefix-tool` utility surface. Before this PR, only 7 of 14 analytics tabs were gated; the other 7 could regress on contrast/aria without CI noticing. ## Changes **`test-a11y-axe-1668.js`** — adds 8 hash-routes to `ROUTES`: - `/analytics?tab=subpaths` - `/analytics?tab=nodes` - `/analytics?tab=distance` - `/analytics?tab=neighbor-graph` - `/analytics?tab=rf-health` - `/analytics?tab=clock-health` - `/analytics?tab=scopes` - `/analytics?tab=prefix-tool` The `prefix-tool` route was verified by greppping `public/analytics.js`: the dispatch arm is `case 'prefix-tool':` (line 292), the nav button uses `data-tab="prefix-tool"` (line 132), and existing UI cross-links use `#/analytics?tab=prefix-tool` (lines 1467, 1469, 1795, 3064). It lives in the analytics tab strip, not a separate `/tools/...` route. `REGISTERED_ANALYTICS_TABS` already lists all 15 tabs (the selftest's reciprocity check kept the constant honest), so no sibling slug-list at line ~82 needed updating beyond the existing list. **`test-a11y-axe-1668-selftest.js`** — adds a meta-assertion that loops over `REGISTERED_ANALYTICS_TABS` and asserts each `tab` has a matching `/analytics?tab=<tab>` entry in `ROUTES`. This locks the gate forever: any new analytics tab added to `analytics.js` will fail the selftest unless its route is also gated. ## TDD shape (red → green) - **Red commit** `a1d9aa8e` — adds the meta-assertion to the selftest. Selftest fails with `#1706: ROUTES missing analytics tab coverage for "/analytics?tab=subpaths"` (asserted, not a build error). - **Green commit** `501d9572` — adds the 8 missing entries to `ROUTES`. Selftest passes: `routes=24 themes=2 allowlist=0`. Cell count: 24 routes × 2 themes × 2 viewports = **96 cells** (was 64). ## Allowlist / tracking issues None yet. The 7 new analytics tabs and `prefix-tool` have not yet been exercised by the full axe browser run in CI — that happens when this PR runs. Per the M5 policy embedded in the gate's header, if any of the new routes fails axe on first run, a follow-up tracking issue + per-policy allowlist entry will be filed (the violations will NOT be silenced in this PR, and the routes will NOT be removed). I'll watch CI and report back. ## Out of scope Per the issue: - No keyboard-nav / focus-visible coverage (separate gap). - No modal / slideover open-state scans (separate gap). - No tufte / density work. - No source-code modifications to any analytics tab (contrast/aria fixes happen in follow-up PRs, not here). ## Preflight Ran `bash ~/.openclaw/skills/pr-preflight/scripts/run-all.sh origin/master` — all hard gates pass, no warnings. ## Verification ``` $ node test-a11y-axe-1668-selftest.js PASS: a11y-axe-1668 selftest — routes=24 themes=2 allowlist=0 ``` --------- Co-authored-by: clawbot <bot@kpa-clawbot.local> Co-authored-by: Kpa-clawbot <bot@openclaw.local> Co-authored-by: openclaw-bot <bot@openclaw>