ARIA checkbox: Mixed State Checkbox with Grouping Label

WAI-ARIA 1.1 : Checkbox pattern

Checkbox Examples

1. Checkbox example with fieldset and legend

Sandwich Condiments

2. Checkbox example with role = group

Sandwich Condiments

3. Checkbox example with aria-labelledby

Sandwich Condiments
Lettuce
Tomato
Mustard
Sprouts

Common Accessibility Features

Keyboard Support

Key Function
Tab Moves keyboard focus to checkbox.
Space Toggle the checkbox option either true, false or mixed. False is the default.

ARIA Roles, Properties and States

Role Property/State Usage
checkbox Identify div as Checkbox widget
aria-checked Indicate state of checkbox:
  • Checked (e.g. aria-checked=true)
  • Unchecked (e.g. aria-checked=false)
  • Mixed (e.g. aria-checked=mixed)
aria-labelledby Used to include grouping label in the label of each checkbox

Source Code

HTML Code

1. Checkbox example with fieldset and legend

2. Checkbox example with role = group

3. Checkbox example with aria-labelledby