On this page
Authoring Practices
A widget is a contract#
WAI-ARIA Authoring Practices Guide is guidance for implementing that contract. A role attribute alone is not a widget.
Every custom widget needs
- Correct role and accessible name
- Keyboard interaction model
- Focus management
- Accurate state updates
Focus pattern: dialog#
Interactive demo
Dialog focus movement
Dialog focus
Closed. Focus is on the page (trigger when last used). (closed)
Pattern checklist#
Use this when building tabs, accordions, menus, or comboboxes.
Test
Widget acceptance
| Action | Expect |
|---|---|
Role/name | Match the widget type and purpose |
Keyboard | Matches APG for that pattern |
Focus | Moves and restores correctly |
State | expanded/selected/checked stay in sync |