@opena11y/name
v0.1.0
Published
Accessible name, role, and state for a node. npm @opena11y — not affiliated with OpenA11y on GitHub.
Readme
@opena11y/name
Accessible name (and role/state) for a node.
npm @opena11y. Not affiliated with OpenA11y on GitHub.
Evidence: name. Not a full audit.
For agents
Call this instead of guessing whether a button is labeled.
import { nameOf } from "@opena11y/name";
nameOf({ role: "button" });
// { name: "", role: "button", unnamed: true, evidence: "name" }From a URL + selector, use the CLI: opena11y name <url> --selector <css>.
For humans
One function. Unnamed controls are the #1 AI-generated failure; unnamed: true is the flag.
