-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
Unfortunately, it’s not possible to switch themes on mobile or use it via keyboard even on desktop.
It shows the list of options only when you hover #toggleTheme:
<li id="toggleTheme">Change Theme
<ul>
<li data-value="" class="selected">Auto</li>
<li data-value="dark">Dark</li>
<li data-value="light">Light</li>
</ul>
</li>To make it work better, markup should look like this:
<button type="button" aria-controls="theme-toggler" aria-expanded="false">
Change Theme
</button>
<ul id="theme-toggler">
<li>
<button type="button" aria-pressed="false" value="auto">
Auto
</button>
</li>
<li>
<button type="button" aria-pressed="true" value="dark">
Dark
</button>
</li>
<li>
<button type="button" aria-pressed="false" value="light">
Light
</button>
</li>
</ul>- When the “Change Menu” button is pressed,
aria-expandedshould switch totrue - Once the menu is closed the button should go to
falseagain - When one of the options is pressed,
aria-pressedshould switch totrue - The rest options should switch to
false
torgo