aria-checked
An ARIA state giving the checked state of a checkbox, radio button or switch: true, false or, for checkboxes, mixed.
In more detail
Custom switches built from a <button> must set it and update it on every toggle, otherwise screen readers cannot tell whether the setting is on. Native checkboxes and radio buttons expose their checked state automatically, so this is only needed on custom controls.
Related terms
- switch role — The ARIA role for an on/off control whose change takes effect immediately, like a light switch.
- checkbox — A form control that can be checked or unchecked, usually submitted with a form.
- radio group — A set of options where exactly one can be chosen, navigated with arrow keys that move both focus and selection.
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering
- Actionable Form Primitives: Buttons, Switches & Inputs — Design Systems & Component Engineering