Skip to content

Commit ef9a21d

Browse files
authored
Merge pull request #709 from craftcms/a11y/dark-mode-switch
Update color mode switch
2 parents cf5f39d + 450424f commit ef9a21d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/.vuepress/theme/components/ColorModeSwitch.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
@click="handleClick"
44
class="dark-mode-toggle"
55
:class="{ 'dark': on, 'light': ! on }"
6-
:aria-label="`Switch dark/light mode`"
6+
role="switch"
7+
:aria-label="`Dark mode`"
8+
:aria-checked="on ? 'true' : 'false'"
79
>
810
<div class="backdrop relative w-full h-full">
911
<div class="knob"></div>

0 commit comments

Comments
 (0)