diff --git a/third_party/aria-practices/src/content/patterns/radio/examples/radio.html b/third_party/aria-practices/src/content/patterns/radio/examples/radio.html index a0bfbb9d5ae63..cb39a19933a4f 100644 --- a/third_party/aria-practices/src/content/patterns/radio/examples/radio.html +++ b/third_party/aria-practices/src/content/patterns/radio/examples/radio.html @@ -2,50 +2,13 @@ - Radio Group Example Using Roving tabindex - - - - - - - - - -
-

Radio Group Example Using Roving tabindex

- -
-

About This Example

- -

- This example implements the features of the Radio Group Pattern for two radio groups -- one for choosing a pizza crust and another for choosing a delivery method. - This implementation uses a roving tabindex for managing focus within the radio group. -

-

Similar examples include:

- -
- -
-
-

Example

-
-

Pizza Crust

@@ -64,219 +27,5 @@
Dine in
- -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

- - - - - - - - - - - - - - - - - - - - - - - - - -
KeyFunction
Tab -
    -
  • Moves focus to the checked radio button in the radiogroup.
  • -
  • If a radio button is not checked, focus moves to the first radio button in the group.
  • -
-
Space -
    -
  • If the radio button with focus is not checked, changes the state to checked.
  • -
  • Otherwise, does nothing.
  • -
  • Note: The state where a radio is not checked only occurs on page load.
  • -
-
Down arrow
Right arrow
-
    -
  • Moves focus to and checks the next radio button in the group.
  • -
  • If focus is on the last radio button, moves focus to the first radio button.
  • -
  • The state of the previously checked radio button is changed to unchecked.
  • -
-
Up arrow
Left arrow
-
    -
  • Moves focus to and checks the previous radio button in the group.
  • -
  • If focus is on the first radio button, moves focus to and checks the last radio button.
  • -
  • The state of the previously checked radio button is changed to unchecked.
  • -
-
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributesElementUsage
radiogroupdiv -
    -
  • Identifies the div element as a container for a group of radio buttons.
  • -
  • Is not focusable because focus is managed using a roving tabindex strategy as described below.
  • -
-
aria-labelledby="[IDREF]"divRefers to the element that contains the label of the radio group.
radiodiv -
    -
  • Identifies the div element as an ARIA radio button.
  • -
  • The accessible name is computed from the child text content of the div element.
  • -
-
tabindex="-1"div -
    -
  • Makes the element focusable but not part of the page Tab sequence.
  • -
  • Applied to all radio buttons contained in the radio group except for one that is included in the page Tab sequence.
  • -
  • - This approach to managing focus is described in the practice for - Managing Focus Within Components Using a Roving tabindex. -
  • -
-
tabindex="0"div -
    -
  • Makes the radio button focusable and includes it in the page Tab sequence.
  • -
  • Set on only one radio in the radio group.
  • -
  • On page load, is set on the first radio button in the radio group.
  • -
  • Moves with focus inside the radio group so the most recently focused radio button is included in the page Tab sequence.
  • -
  • - This approach to managing focus is described in the practice for - Managing Focus Within Components Using a Roving tabindex. -
  • -
-
aria-checked="false"div -
    -
  • Identifies radio buttons which are not checked.
  • -
  • CSS attribute selectors (e.g. [aria-checked="false"]) are used to synchronize the visual states with the value of the aria-checked attribute.
  • -
  • The CSS ::before pseudo-element is used to indicate visual state of unchecked radio buttons to support high contrast settings in operating systems and browsers.
  • -
-
aria-checked="true"div -
    -
  • Identifies the radio button which is checked.
  • -
  • CSS attribute selectors (e.g. [aria-checked="true"]) are used to synchronize the visual states with the value of the aria-checked attribute.
  • -
  • The CSS ::before pseudo-element is used to indicate visual state of checked radio buttons to support high contrast settings in operating systems and browsers.
  • -
-
-
- -
-

Assistive Technology Support

-

Learn how to interpret and use assistive technology support data

- -
- -
-

JavaScript and CSS Source Code

- -
- -
-

HTML Source Code

-

To copy the following HTML code, please open it in CodePen.

- -
- - -
-