Skip to content

Accessibility in CI: jsx-a11y lint, skip link, axe in Edge (4.1) - #188

Merged
firegiant9000 merged 11 commits into
mainfrom
w4-a11y-ci
Nov 18, 2026
Merged

firegiant9000 merged 11 commits into
mainfrom
w4-a11y-ci

Conversation

@firegiant9000

Copy link
Copy Markdown
Owner

Post-audit plan row 4.1: accessibility checks now run in lint and in CI.

What changes

  • JSX accessibility lint. eslint-plugin-jsx-a11y now runs with its recommended rules. It found 11 violations: 2 are fixed, and 9 are disabled on a single line each, with the reason written on that line:
    • no-noninteractive-tabindex ×3 (CandidateReviewPanel ×2, ClassGrid). These scrollable regions must be focusable for keyboard scrolling (WCAG 2.1.1).
    • no-noninteractive-element-interactions ×4 (ArchivePanel, CharacterBuilder, SampleNote, MoreMenu). Escape bubbles up from the real buttons; the wrapper itself is not a control.
    • no-static-element-interactions ×1 (MoreMenu disclosure wrapper).
    • no-autofocus ×1 (CharacterBuilder first field when the builder opens).
  • TreeView aria-selected. The roving item now announces "selected" (one of the 2 fixes). The e2e suite covers it.
  • Skip link. "Skip to main content" is the first Tab stop. It moves focus to <main id="main-content" tabindex="-1">:
    • The link is off-screen until focused and hidden in print.
    • main shows no focus ring when it takes focus, even with "Always show focus" on.
  • axe in Edge (npm run test:a11y). Vitest browser mode runs in the installed Edge (channel: 'msedge') against the real DevHost, with colour contrast on.
    • Coverage: home (empty and with a character), each builder step, and each sheet tab. Light and dark run as two projects. Home and the focused skip link also run in the cool, violet, ember, rose and tide themes.
    • serious and critical violations fail the run.
    • A dev-only Vite middleware (a11y/devhostProxy.ts) forwards POST /api/command from Node with the token and no Origin:
      • it accepts JSON only;
      • it rejects bodies over 1 MB;
      • each scheme gets its own DevHost.
    • src/DevHost is unchanged, and the shipped app still opens no socket (ADR-006).
  • CI. One new step in the gui job, after the smoke, two-instance and WebView2 evidence steps, so an axe failure doesn't skip them. The required check name (build-test) is unchanged.
  • Two contrast fixes. No colour tokens change.
    • Light: the header "Offline" tag was 4.09:1. Tags now sit on the page colour.
    • Dark: status-bar buttons showed Edge's own button face under the dimmed label, at 2.34:1. They now have an explicit page-colour background. In light this replaces the native grey face.
  • Docs. The CONTRIBUTING gate gains a line, accessibility checklist line 25 is updated, checklist item 125 (automated axe in Edge) is new, and there is a CHANGELOG entry.

Dependencies (dev-only)

  • eslint-plugin-jsx-a11y.
    • A scoped override pins minimatch 3.1.5, a patched version, under that plugin only. The global minimatch ^11 override crashed label-has-associated-control.
  • @vitest/browser-playwright 5.0.5 and playwright 1.65.1, pinned.
    • Edge comes from the system channel, so there's no playwright install and no browser download.
  • src/Ui/tsconfig.json gains allowImportingTsExtensions. noEmit is already on. The a11y config imports ./a11y/devhostProxy.ts, and Vite's config loader warns about an extensionless import.
  • npm audit: 15 high findings, all one picomatch ReDoS advisory reached through vite, vitest and tinyglobby. It was already on main (picomatch 4.0.7 in the base lockfile); this branch adds none.

Verification

Local gate at 9452dbc, run in order:

Step Result Time
lint clean
unit 2061/2061
UI build ok
.NET build 0 warnings
.NET tests 6288 passed, 14 skipped
e2e 82/82 314 s
test:a11y 22/22

After the review fixes:

  • test:a11y passed 22/22 again, with no violations in any named theme.
  • Lint and build are clean.
  • The CI workflow tests pass 9/9.

The branch had a dual review (logic and risk). Its confirmed findings are fixed and re-reviewed clean.

Owner

  • Gate 8–9: scripts/smoke.ps1 and scripts/single-instance-check.ps1 against the Release exe.
  • Look at the "Offline" tag in the header and the status-bar buttons, in light and dark.
  • Manual check (checklist item 125): High Contrast / forced colours. axe can't check it.
  • The first CI run proves Edge-only Playwright works on windows-latest. The gui job's 30-minute timeout now covers one more step.

@firegiant9000
firegiant9000 merged commit 5f04196 into main Nov 18, 2026
5 checks passed
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.

1 participant