a11y: add aria label to theme switch button

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-02-03 17:05:36 +01:00
parent 14f905327b
commit c1cd9f7f84
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
</div>
<div class="flex items-center gap-6">
<div id="docsearch"></div>
<button id="theme-switch" class="svg-icon"
<button aria-label="Theme switch" id="theme-switch" class="svg-icon"
x-data="{ theme: localStorage.getItem('theme-preference') }" x-init="$watch('theme', value => {
localStorage.setItem('theme-preference', value);
document.firstElementChild.className = value;