Introduction to -axxy-
W3C Standards as API. -axxy- is a zero-dependency WAI-ARIA behavioral kernel for standard HTML: standard elements, W3C roles, and ARIA attributes go in; standard ARIA states and keyboard/focus behavior come out—scoped inside <axxy-scope> without proprietary widget tags, vendor class names, or framework lock-in.
Scoped wrappers, standard W3C roles
<axxy-scope> is the library's custom element. Place it directly around the specific widgets or subtrees that need enhancement—not necessarily at the root of a large application—to keep scanning localized and predictable alongside component frameworks (such as Angular OnPush or island architectures). Each host matches standard HTML elements, W3C roles, and ARIA states to modules in a shared registry, adding the states, relationships, keyboard handling, or focus management each pattern needs. Mount a fresh wrapper for new components, or call rescan() for an explicit refresh.
Minimal ARIA by design: you only need to write the unavoidable ARIA attributes that define a component's API (such as aria-pressed for a toggle button or role="tablist" for tabs). Any additional aria-* attributes or ids you supply are respected and preserved; when omitted, -axxy- automatically generates missing ids and wires relationship attributes like aria-controls, aria-labelledby, and aria-describedby for you.
<axxy-scope>
<section aria-label="Shipping and returns" aria-roledescription="accordion">
<h3>
<button aria-expanded="true">Shipping</button>
</h3>
<div role="region">
Standard delivery takes 3–5 business days.
</div>
<h3>
<button>Returns</button>
</h3>
<div role="region">
Unused items can be returned within 30 days.
</div>
</section>
</axxy-scope>
<axxy-scope>
<section aria-label="Shipping and returns" aria-roledescription="accordion">
<h3>
<button id="axxy-accordion-1" type="button"
aria-controls="axxy-accordion-panel-2" aria-expanded="true">Shipping</button>
</h3>
<div id="axxy-accordion-panel-2" role="region" aria-labelledby="axxy-accordion-1">
Standard delivery takes 3–5 business days.
</div>
<h3>
<button id="axxy-accordion-3" type="button"
aria-controls="axxy-accordion-panel-4" aria-expanded="false">Returns</button>
</h3>
<div id="axxy-accordion-panel-4" role="region" aria-labelledby="axxy-accordion-3" hidden>
Unused items can be returned within 30 days.
</div>
</section>
</axxy-scope>
On initialization, -axxy- generates missing trigger and panel ids, sets type="button", links each trigger with aria-controls, normalizes aria-expanded, labels each role="region" panel via aria-labelledby, and hides collapsed panels with hidden. Load the entry script once (see the installation guide) and try the live accordion below—click a heading or press ArrowUp, ArrowDown, Home, or End:
Start with native HTML
Use a native button, link, input, or landmark whenever it fits the interaction. -axxy- builds on those semantics and uses ordinary ES modules without a framework or runtime package dependencies. Styling belongs to your application.
Built for HTML-first apps and Design Systems
Design systems and UI toolkits repeatedly re-implement the same W3C ARIA keyboard, focus, and state machines across frameworks. -axxy- isolates that shared accessibility behavior into a lightweight, standard-HTML layer—so styling libraries, custom toolkits, and application teams can focus on visual identity, UX, and business logic.
Learn from the patterns
The Components navigation contains 67 original implementations corresponding to the unique links in the two Examples columns of the W3C APG index. Each page includes a working example, keyboard instructions, events, markup, and its W3C reference. Deprecated examples are identified; the index's separate experimental examples are outside this collection.
These examples are a starting point for implementation and testing. They do not establish WCAG conformance for your application. Verify names, focus behavior, visual presentation, and assistive-technology interaction in your own context; see the references.