@opena11y/focus
v0.1.0
Published
Real Tab order and missing focus indicators. npm @opena11y — not affiliated with OpenA11y on GitHub.
Readme
@opena11y/focus
Real Tab order and whether the focused node has a visible indicator.
npm @opena11y. Not affiliated with OpenA11y on GitHub.
Evidence: keyboard. Not WCAG conformance. Not a screen-reader test.
Needs Playwright Chromium for URL/file input: npx playwright install chromium
For agents
Press Tab. Do not invent a tabIndex list.
import { fromSequence, focusFromUrl } from "@opena11y/focus";
const result = await focusFromUrl("fixtures/shop.html");
// result.evidence === "keyboard"
// result.missingIndicator — focused with no :focus-visible replacementCLI: opena11y focus <url> [--format json|md]
A missing indicator is a finding. An axe pass is a different evidence class.
For humans
The check axe is weak at: actual keyboard focus sequence, plus 3:1 (WCAG 2 non-text) for a custom outline. Browser outline: auto counts as present.
