Skip to content

test(axe): expand accessibility regression coverage - #14713

Merged
cderv merged 4 commits into
mainfrom
feature/expand-axe-test-coverage
Jul 21, 2026
Merged

test(axe): expand accessibility regression coverage#14713
cderv merged 4 commits into
mainfrom
feature/expand-axe-test-coverage

Conversation

@cderv

@cderv cderv commented Jul 21, 2026

Copy link
Copy Markdown
Member

Recent axe-core changes (#14607, #14655, #14667, #14677, #14680) reworked the
accessibility-report feature repeatedly with no dedicated regression tests
guarding several of its behaviors. A coverage audit found three gaps; this
closes them.

Extending the self-scan to RevealJS and the dashboard surfaced a real
pre-existing issue: both report-chrome regions are scrollable but not
keyboard-focusable once they overflow, the same class of gap already fixed
for the plain-HTML overlay. Filed as #14710, not fixed here — the dashboard
test filters that one known node out of the scrollable-region-focusable
violation (not the whole violation), so it still catches other regressions
in that scope.

Related to #14710

cderv added 4 commits July 21, 2026 12:13
#14677)

PR #14677 vendored axe-core to drop a Skypack CDN dependency so axe
checking works offline and never phones home, but nothing guarded
against a future revert. Adds two complementary tests: a Playwright
behavioral guard that fails if an axe-enabled page makes any request to
a known package-CDN host, and a Deno static guard that scans axe-check.js
and format-html-axe.ts for hard-coded CDN host references (catching a
CDN fallback path the behavioral test can't exercise, since the vendored
file always returns 200 in tests).
Commit 4a528a2 made the fixed HTML overlay a focusable native scroll
region (overflow-y: auto + tabindex=0, no keydown handler). Coverage was
static only: attribute checks plus the axe self-scan. Neither catches the
overlay silently losing keyboard scroll while the attributes stay intact
(overflow-y flipped away from auto, or a future keydown handler swallowing
the keys). Add a Playwright test on the existing axe-overlay-scroll fixture
that focuses the overlay, presses PageDown and ArrowDown, and asserts the
overlay's scrollTop actually changes.
The report chrome is injected after the page scan runs, so like the HTML
overlay it never audits itself. Scan .quarto-axe-report-slide (navigated
present, since it is otherwise a hidden future slide) and #quarto-axe-offcanvas
plus its sibling .quarto-axe-toggle, asserting zero violations. Guards against
a template refactor dropping a button aria-label, alt text, or aria wiring.

The dashboard offcanvas body already overflows on this fixture and axe flags
scrollable-region-focusable on it (#14710) -- filtered
out of this test's assertion rather than using test.fail(), so the test still
catches any other regression (e.g. a dropped aria-label) while that issue is
open. The reveal report slide has the same latent gap once it overflows
(confirmed manually with a throwaway long fixture, not committed here since
the rule doesn't fire on this short fixture) but is out of scope for a
permanent guard test per #14710 pending a fix decision.
Whole-violation filtering hid a hypothetical second, unrelated
scrollable-region-focusable node in the same scan scope as long as the
known .offcanvas-body node remained. Filter targets instead so any
other node under the rule still fails the test while #14710 is open.
@posit-snyk-bot

posit-snyk-bot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
cderv merged commit 6cb6e3f into main Jul 21, 2026
51 checks passed
@cderv
cderv deleted the feature/expand-axe-test-coverage branch July 21, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants