Add aria-label to theme toggle button for accessibility (#1669)

This commit is contained in:
Colton Loftus 2025-03-01 01:48:36 -05:00 committed by GitHub
parent f84eeba36e
commit bd46db414e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,7 +74,7 @@
{{- end }} {{- end }}
<div class="logo-switches"> <div class="logo-switches">
{{- if (not site.Params.disableThemeToggle) }} {{- if (not site.Params.disableThemeToggle) }}
<button id="theme-toggle" accesskey="t" title="(Alt + T)"> <button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24" <svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round"> stroke-linejoin="round">