test(a11y): gate the foreign-traffic, wardriving and areas analytics tabs - #59
Merged
Merged
Conversation
…tabs test-a11y-axe-routes-coverage.js (Kpa-clawbot#1706) requires every data-tab button in public/analytics.js to be exercised by the axe gate. The Foreign Traffic, Wardriving and Areas tabs were added afterwards without ROUTES entries, so the coverage check failed and the axe gate never scanned them. Add the three routes and register the tabs so the selftest's dispatch-arm reciprocity also covers them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The last command of the "Run JS unit tests (packet-filter)" CI step,
test-a11y-axe-routes-coverage.js(Kpa-clawbot#1706), fails on master:The gate requires every
data-tabbutton inpublic/analytics.jsto be exercised by the axe-core browser gate (test-a11y-axe-1668.js). The Foreign Traffic, Wardriving and Areas tabs were added after the gate (July 2026) without matchingROUTESentries. The tabs are real — each has acasearm in therenderTabdispatch (public/analytics.js:316-318) — so the expectation is not stale: the axe gate simply never scanned these tabs.This failure has been hidden until now because the same CI step stopped earlier, on the Kpa-clawbot#1648 M4 icon scan (fixed separately in #56).
Change
test-a11y-axe-1668.jsonly (+4/−1):/analytics?tab=foreign-traffic,/analytics?tab=wardrivingand/analytics?tab=areastoROUTES, so the browser gate visits each tab, runs the existing mount assertion (tab active, content non-empty) and then axe.REGISTERED_ANALYTICS_TABS, so the selftest's dispatch-arm reciprocity check covers them too.Not changed: the coverage assertion, the selftest, the wait/mount logic, axe rules, the allowlist, workflows, production code.
Verification
All local, macOS arm64, Node v25.6.1 — not GitHub CI.
On this branch's HEAD (
e3f57426, basee17377d8):test-a11y-axe-routes-coverage.js: fails on base with exactly the three tabs; passes on HEAD (declared=20 covered=20).test-a11y-axe-1668-selftest.js: passes (routes=29).node --check test-a11y-axe-1668.jsandgit diff --check: clean.Local integration of master
e17377d8+ #56 (52ae9d1c) + this change:set -e+ the 67nodecommands, in workflow order): 67/67 passed. This result depends on fix(map): drop the M4-banned caret from a map.js comment #56; see "Merge order" below.--diffgate: passes.axe browser gate (isolated local Go server on :13581 with a copy of
test-fixtures/e2e-fixture.db, prepared like CI: freshen, seed, migrate; pinnedplaywright1.58.2 /@axe-core/playwright4.11.3 /axe-core4.12.1; installed Google Chrome 151 viaCHROMIUM_PATHwith DNS restricted to localhost — CI uses Playwright's bundled Chromium with network access, so results may differ):Known limitations
/analytics?tab=scopes:duplicate-idonanalytics-tbl-scopes-0(4 cells)./livedesktop/light:color-contraston the LIVE badge#vcrMode, 2.27:1 vs 4.5:1 (1 cell).These are not caused or fixed by this PR; they are being addressed separately.
🤖 Generated with Claude Code