@gomani/a11y
v0.8.0
Published
Accessibility as a default: accessible primitives, focus management, and a build-time a11y gate.
Maintainers
Readme
@gomani/a11y
Accessibility as a default (P11), not an add-on: accessible primitives, focus management, and a build-time a11y gate that fails the build like the weight budget.
The gate
@gomani/build audits every route's rendered HTML and fails on any error-severity defect — a static
analysis (no browser, no runtime cost) tuned for very few false positives:
✓ a11y: no issues across 3 route(s)Rules: html-has-lang, img-alt, button-name, link-name, label-control (incl. implicit
<label> wrapping), unique-ids, no-positive-tabindex. Override severities in gomani.a11y.json:
{ "rules": { "no-positive-tabindex": "off", "img-alt": "error" } }Use it standalone too: auditHtml(html) / runA11yAudit(pages) / formatA11yReport(report).
Primitives
Server-safe render helpers — VisuallyHidden (accessible names for icon-only controls), SkipLink,
Alert / Status (live regions), and useId (stable label associations).
Client (@gomani/a11y/client)
Focus management — createFocusTrap / getFocusable — and announce for programmatic
screen-reader messages via a shared live region.
