Skip to content

Commit

Permalink
Added text in code walkthrough about word state in switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan-dulac committed Feb 3, 2025
1 parent ab0aeed commit a158fce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/body/switch.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class="switch" aria-describedby="speakerPower-checked">
"notes": "Just like any other interactive element, a switch needs a label."
},
{
"label": "Denote state without using color",
"highlight": "on|off",
"notes": "In this example, we put the words \'on\' and \'off\' inside the control to show the state, thus avoiding using color alone. This may not be possible in other languages (where the words will not fit), but can be put ourside the control for a similar effect."
"label": "Display change of state without using color",
"highlight": "[\\s]+(off|on)",
"notes": "In this example, we put the words 'on' and 'off' visually inside the control to show the state, thus avoiding using color alone. This may not be possible in other languages (where the words will not fit), but you could change the design to put those words next to or underneath the control for a similar effect."
}
]
}
Expand Down

0 comments on commit a158fce

Please sign in to comment.