ARIA roles tell assistive technology what an element is when the HTML alone
cannot. Get the required states wrong and a screen reader announces a broken or
silent widget. This tool is a fast offline reference plus a validator that checks
a pasted element’s role and aria-* attributes against the rules.
How it works
Paste an element tag and the validator parses out the role value and every
aria-* attribute, then applies two checks for that role:
- Required states/properties — attributes the role cannot function without.
role="checkbox"requiresaria-checked;role="slider"requiresaria-valuenow;role="combobox"requiresaria-expanded. Missing ones are flagged. - Prohibited attributes — roles like
presentation/noneand the various generic roles cannot carry an accessible name, soaria-labelandaria-labelledbyon them are invalid and flagged.
The reference list below the validator is searchable by name, category, or keyword and shows each role’s purpose, its required states, commonly supported properties, and a note steering you toward the native HTML element where one exists.
Worked example
<div role="checkbox">Subscribe</div>
This is flagged: role="checkbox" requires aria-checked, which is missing — a
screen reader would announce “checkbox” with no checked/unchecked state. The fix:
<div role="checkbox" aria-checked="false" tabindex="0">Subscribe</div>
Better still, use the native control, which carries the role and state for free:
<input type="checkbox" id="sub"><label for="sub">Subscribe</label>
Notes
- The role categories follow WAI-ARIA: landmark (banner, navigation, main), widget (button, checkbox, slider, tab), structure (list, heading, img), window (dialog, alertdialog), and live regions (alert, status).
- Live-region roles like
alertandstatuscarry an implicitaria-livevalue — do not also setaria-liveon them. - This reference covers the common roles, not the entire specification. For edge cases and full inherited-state tables, consult the official WAI-ARIA 1.2 document.