Switch ARIA role

From Level Access Web Labs
Jump to navigation Jump to search
  • role=switch
  • aria-checked attribute indicates on or off state
  • Page for testing accessible name calculation only
  • Sample switch doesn't actually toggle aria-checked state or display icon.

Name as text content "running?"

Is your refrigerator running?
Running?

Name as aria-labelledby "Is your refrigerator running?"

Is your refrigerator running?
Running?

Name as aria-label "Fridge is running?"

Is your refrigerator running?
Running?

Name as title attribute with text content "Running?"

Is your refrigerator running?
Running?

Name as title attribute with no text content "Fridge is running?"

Is your refrigerator running?