Skip to content

Allowlist request: @okent/accessibility-scanner-keyboard-plugin #285

Backlog

Description

@owenpkent

Link to your plugin on NPM

https://www.npmjs.com/package/@okent/accessibility-scanner-keyboard-plugin

Link to the source code for your plugin on GitHub

https://github.com/owenpkent/accessibility-scanner-keyboard-plugin

What does your plugin do?

It drives the keyboard on each page and reports the failures a rule engine inspecting the DOM at rest cannot see. It presses Tab through the real focus order (including shadow roots), records each stop, and judges the walk afterwards:

Rule WCAG Finding
keyboard-trap 2.1.2 Tab cycles inside a subset of the page and Escape does not release it
keyboard-unreachable 2.1.1 a visible interactive element never receives focus during a complete walk
focus-not-visible 2.4.7 focusing an element produces no visible change (byte-identical screenshots focused vs. blurred); needs review: for text-entry elements
focus-order-vs-dom 2.4.3 the focus order jumps backwards against the DOM; always needs review:

It uses the {page, addFinding} plugin contract and has no runtime dependencies; Playwright comes from the scanner. Review-only findings use the needs review: prefix in problemShort, following the reflow plugin's convention, since Finding has no confidence field. Radio groups and roving-tabindex composites are exempt from the unreachable rule when their group was reached, and nothing past a trap is judged. Iframes are not walked; that, and any walk that hits its step limit, is logged rather than reported, because the scanner has no info-level finding. A clean walk is not reported as a pass.

Tests: unit tests for the walk analysis, and an end-to-end test that runs the plugin through the same {page, addFinding} contract against a fixture with planted keyboard defects and control cases. Both run in CI on the repository. MIT licensed.

Activity

  1. owenpkent commented on Oct 19, 2026

    @owenpkent
    Author

    Please review 0.1.2 rather than 0.1.1: https://www.npmjs.com/package/@okent/accessibility-scanner-keyboard-plugin/v/0.1.2

    It fixes three walk bugs found in our own review, each with a regression test (test/regressions.test.ts):

    • The element focused after stepping past an iframe or a trap was skipped by the next Tab and wrongly reported keyboard-unreachable.
    • A trap that is not the last thing on the page was reported twice.
    • Any visible role="dialog" scoped the walk to itself, so a non-modal cookie banner could hide the rest of the page. Only dialog:modal or aria-modal="true" dialogs scope the walk now, and a scoped walk is logged.

    Scans config for 0.1.2:

    scans: |
      ["axe", {"name": "keyboard-scan", "package": "@okent/accessibility-scanner-keyboard-plugin", "version": "0.1.2"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions