Trên trang này

Trang này chưa có bản tiếng Việt, nội dung bên dưới là bản tiếng Anh. Xem trang tiếng Anh

Checkbox

What Checkbox gives you and what your team does.

Conformance

Checkbox meets WCAG 2.2 level AA when used as described on these pages.

Keyboard

  • Tab moves to the box.
  • Space checks or unchecks it.

What Checkbox gives you

  • role="checkbox" with aria-checked, including mixed for indeterminate.
  • A visible focus ring and a 24 px click area.

What your team does

  • Give every checkbox a visible label linked with for/id.
  • Group related checkboxes in a fieldset with a legend.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A Label and group are in the markup
2.5.8 Target Size (Minimum) AA 24 px click area
4.1.2 Name, Role, Value A Checked state is exposed