Components that work for everyone
A polished showcase of five WAI-ARIA patterns — built with vanilla HTML, CSS and JavaScript. No frameworks, no shortcuts, just correct semantics, focus management and keyboard contracts.
1 Modal Dialog
Tab trap · Esc close · Focus returnsOpens from a button, traps focus, closes on Esc or backdrop click. Background becomes inert so screen readers and keyboards can’t escape.
3 Tabs
← → switch · Tab reaches panel contentExactly one tab in the tab order. ← → move focus and activate. Hidden panels use hidden so they’re inert.
- You merged PR #482 — 2h ago
- Mara commented on “Auth flow” — 5h ago
- System deployed v2.4.1 to staging
4 Combobox
Type to filter · ↑↓ highlight · Enter select · Esc revertInput uses role="combobox" + aria-activedescendant. The listbox itself is never focused; the input retains focus.
5 Accordion
Enter / Space toggle · Multiple open · AnimatedDisclosure buttons with aria-expanded / aria-controls. Regions animate height, then toggle hidden so assistive tech stays in sync.
Prism is a tiny, copy-pasteable set of WAI-ARIA patterns. Each component is plain HTML/CSS/JS so you can audit every aria-* attribute.
It’s designed to be a reference you ship, not just a demo.
Every interactive element is reachable by Tab. Within widgets, arrow keys follow the APG patterns: roving tabindex for tabs, activedescendant for combobox, and focus trapping for modals.
Panels animate height for sighted users, but hidden is only toggled after the animation completes. If you prefer reduced motion, all transitions are disabled via prefers-reduced-motion.
Yes. Copy the markup, CSS and the JS helpers (createFocusTrap, activedescendant manager). Keep the IDs and ARIA wiring intact and you’ll keep the accessibility guarantees.
Built for keyboard, screen reader and 200% zoom. No frameworks, no dependencies.