diff --git a/third_party/aria-practices/src/content/patterns/checkbox/examples/checkbox.html b/third_party/aria-practices/src/content/patterns/checkbox/examples/checkbox.html index 5b5bb2ce0507c..8a947319661b2 100644 --- a/third_party/aria-practices/src/content/patterns/checkbox/examples/checkbox.html +++ b/third_party/aria-practices/src/content/patterns/checkbox/examples/checkbox.html @@ -2,48 +2,13 @@ - Checkbox Example (Two State) - - - - - - - - - -
-

Checkbox Example (Two State)

- -
-

About This Example

- -

This example implements the Checkbox Pattern for a two state checkbox using div elements.

- -

Similar examples include:

- -
- -
-
-

Example

-
- -

Sandwich Condiments

@@ -55,158 +20,5 @@
- - -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

- - - - - - - - - - - - - - - - - -
KeyFunction
TabMoves keyboard focus to the checkbox.
SpaceToggles checkbox between checked and unchecked states.
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
h3 -
    -
  • Provides a grouping label for the group of checkboxes.
  • -
-
groupdiv -
    -
  • Identifies the div element as a group container for the checkboxes.
  • -
-
aria-labelledbydivReferences the id attribute of the h3 element to define the accessible name for the group of checkboxes.
checkboxdiv -
    -
  • Identifies the div element as a checkbox.
  • -
  • The child text content of this div provides the accessible name of the checkbox.
  • -
-
tabindex="0"divIncludes the checkbox in the page tab sequence.
aria-checked="false"div -
    -
  • Indicates the checkbox is 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.
  • -
  • To support operating system and browser high contrast settings, the CSS ::before pseudo element and content property are used to generate the visual indicators of the checkbox state.
  • -
-
aria-checked="true"div -
    -
  • Indicates the checkbox 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.
  • -
  • To support operating system and browser high contrast settings, the CSS ::before pseudo element and content property are used to generate the visual indicators of the checkbox state.
  • -
-
-
- -
-

JavaScript and CSS Source Code

- -
- -
-

HTML Source Code

-

Simple Two-State Checkbox Example

-

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

- -
- - -
-