diff --git a/third_party/aria-practices/src/content/patterns/switch/examples/switch-checkbox.html b/third_party/aria-practices/src/content/patterns/switch/examples/switch-checkbox.html index 3aeb8f317c031..d8698809748d1 100644 --- a/third_party/aria-practices/src/content/patterns/switch/examples/switch-checkbox.html +++ b/third_party/aria-practices/src/content/patterns/switch/examples/switch-checkbox.html @@ -2,50 +2,13 @@ - Switch Example Using HTML Checkbox Input - - - - - - - - - -
-

Switch Example Using HTML Checkbox Input

- -
-

About This Example

- -

- This example illustrates implementing the Switch Pattern with an HTML input[type="checkbox"] as the switch element and using CSS borders to provide graphical rendering of switch states. - It also demonstrates using the HTML fieldset and legend elements to present multiple switches in a labeled group. -

-

Similar examples include:

- -
- -
-
-

Example

-
-
Accessibility Preferences @@ -74,127 +37,5 @@
- -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

- - - - - - - - - - - - - - - - - -
KeyFunction
TabMoves keyboard focus to the switch.
SpaceToggles the state of the switch between on and off.
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
switchinput[type="checkbox"] -
    -
  • Identifies the element as an ARIA switch.
  • -
  • The accessible name is defined using the label element.
  • -
-
aria-hidden="true"span.on and span.off -
    -
  • Removes the strings on and off that appear to the right of the switch from the accessible name of the switch.
  • -
  • These strings are included only for enhancing visual comprehension of the state; element states are not permitted in accessible names.
  • -
-
-
- -
-

JavaScript and CSS Source Code

- -
- -
-

HTML Source Code

-

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

- -
- - -
-