diff options
| author | eltrac <hi@eltr.ac> | 2026-04-15 13:40:32 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-15 13:40:32 +0800 |
| commit | b807f9b6efe25f414173385ae248cd205ebd5bb9 (patch) | |
| tree | 994651107062a13a9b055dd30bdd23c27e50d06d | |
| parent | d5188adef5fae07dba6644faaec070d1d4417a51 (diff) | |
perf(a11y): add aria-labels and unique identifier to elements
| -rw-r--r-- | layouts/_partials/header/navigation.html | 3 | ||||
| -rw-r--r-- | layouts/_partials/header/other-navigation.html | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_partials/header/navigation.html b/layouts/_partials/header/navigation.html index 168d614..7e69aff 100644 --- a/layouts/_partials/header/navigation.html +++ b/layouts/_partials/header/navigation.html @@ -1,4 +1,5 @@ -<nav class="my-6 flex justify-center items-center w-fit rounded-4 overflow-hidden"> +<nav id="header-navigation" + class="my-6 flex justify-center items-center w-fit rounded-4 overflow-hidden"> {{ range .Site.Params.nav }} <a class="inline-block py-1 px-[0.35rem] md:px-2 first:pl-3 last:pr-3 block hover:no-underline text-nowrap diff --git a/layouts/_partials/header/other-navigation.html b/layouts/_partials/header/other-navigation.html index 4be0dba..13cacc5 100644 --- a/layouts/_partials/header/other-navigation.html +++ b/layouts/_partials/header/other-navigation.html @@ -3,7 +3,8 @@ <div class="flex gap-2 pr-2"> <!-- theme switch --> <label for="theme-select" class="hidden">colorscheme</label> - <select id="theme-select" + <select id="theme-select" name="theme" + aria-label="Switch colorscheme" class="bg-neutral/10 border-1 border-[var(--text-color)] border-solid rd text-[var(--text-color)] font-serif text-size-[0.5rem] font-extrabold"> {{ $switches := slice "auto" "light" "dark" }} {{ range $switches }} |
