diff --git a/third_party/aria-practices/src/content/patterns/switch/examples/switch.html b/third_party/aria-practices/src/content/patterns/switch/examples/switch.html index 77484ef771c74..57d7869d283e6 100644 --- a/third_party/aria-practices/src/content/patterns/switch/examples/switch.html +++ b/third_party/aria-practices/src/content/patterns/switch/examples/switch.html @@ -2,50 +2,13 @@ - Switch Example - - - - - - - - - -
-

Switch Example

- -
-

About This Example

- -

- This example illustrates implementation of the Switch Pattern for a notification preferences control. - It uses a div element for the switch and CSS borders to provide graphical rendering of switch states. -

-

Similar examples include:

- -
- -
-
-

Example

-
-
Notifications @@ -56,163 +19,5 @@
- -
- -
-

Accessibility Features

- -
- -
-

Keyboard Support

- - - - - - - - - - - - - - - - - -
KeyFunction
Tab -
    -
  • Moves keyboard focus to the switch.
  • -
-
Space
Enter
-
    -
  • Toggle switch between on and off.
  • -
-
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
switchdivIdentifies the div element as a switch.
tabindex="0"divIncludes the switch in the page Tab sequence.
aria-checked="false"div -
    -
  • Indicates the switch is off.
  • -
  • CSS attribute selectors (e.g. [aria-checked="false"]) are used to synchronize the visual states with the value of the aria-checked attribute.
  • -
-
aria-checked="true"div -
    -
  • Indicates the switch is on.
  • -
  • CSS attribute selectors (e.g. [aria-checked="true"]) are used to synchronize the visual states with the value of the aria-checked attribute.
  • -
-
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.
  • -
-
-
- -
-

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.

- -
- - -
-