Accessible Ariel
W3C WAI form tutorial topics: labeling, grouping, instructions, validation, notifications, and custom controls.
Click any rule to expand it. Tags show which W3C WAI section it covers.
A visible <label> linked with htmlFor gives every input an accessible name. Placeholders are never a substitute.
✓ Correct
✗ No label
Radios, checkboxes, and related fields need semantic grouping so screen readers announce the group name alongside each control.
Radio buttons → <fieldset> + <legend>
Checkboxes — also need <fieldset> + <legend>
Select with <optgroup>
Related text fields → role="group" + aria-labelledby
When native elements won't do, add role, aria-checked, and keyboard handlers so custom widgets behave like their native counterparts.
Star rating → role="radiogroup" + role="radio" + arrow key navigation
Toggle switch → role="switch" + aria-checked
Pre-form instructions, fieldset grouping, inline hints, aria-invalid, a focusable error summary, and a live-region success message. Submit empty to see validation in action.
you@example.comEvery requirement from the W3C WAI Forms Tutorial, mapped to code patterns.