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