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

Radio group

What Radio group gives you and what your team does.

Conformance

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

Keyboard

  • Tab moves into the group, to the chosen option.
  • Arrow keys move to and choose the next or previous option.

What Radio group gives you

  • role="radiogroup" and role="radio" with aria-checked.
  • Roving focus: the group is one Tab stop.

What your team does

  • Name the group (aria-label or a legend).
  • Give every option a visible label.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A Group and labels are in the markup
2.1.1 Keyboard A Arrow keys choose
4.1.2 Name, Role, Value A Chosen state is exposed