Skip to content

Commit

Permalink
fix: accessbility
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Mar 28, 2024
1 parent 5a82b8f commit 4cc9378
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<span class="menu-item delimiter"></span>
{{- end -}}
{{- if .Site.IsMultiLingual -}}
<button class="menu-item language" title="{{ T " selectLanguage" }}">
<button class="menu-item language" {{ printf "aria-label=%q" (T "selectLanguage") | safeHTMLAttr }}>
{{- .Language.LanguageName -}}
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "chevron-right") }}
<select class="language-select" title="{{ T " selectLanguage" }}" id="language-select-desktop"
<select class="language-select" {{ printf "aria-label=%q" (T "selectLanguage") | safeHTMLAttr }} id="language-select-desktop"
onchange="location = this.value;">
{{- if eq .Kind "404" -}}
{{- /* https://github.com/dillonzq/LoveIt/issues/378 */ -}}
Expand Down Expand Up @@ -82,17 +82,17 @@
</span>
{{- end -}}
{{- if eq .Site.Params.header.themeChangeMode "select" -}}
<button class="menu-item theme-select" title="{{ T " switchTheme" }}">
<button class="menu-item theme-select" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "adjust") }}
<select class="color-theme-select" id="theme-select-desktop" title="{{ T " switchTheme" }}">
<select class="color-theme-select" id="theme-select-desktop" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
<option value="light">{{ T "Light" }}</option>
<option value="dark">{{ T "Dark" }}</option>
<option value="black">{{ T "Black" }}</option>
<option value="auto">{{ T "Auto" }}</option>
</select>
</button>
{{- else -}}
<button class="menu-item theme-switch" title="{{ T " switchTheme" }}">
<button class="menu-item theme-switch" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "adjust") }}
</button>
{{- end -}}
Expand Down Expand Up @@ -169,17 +169,17 @@
</a>
{{- end -}}
{{- if eq .Site.Params.header.themeChangeMode "select" -}}
<button class="menu-item theme-select" title="{{ T " switchTheme" }}">
<button class="menu-item theme-select" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "adjust") }}
<select class="color-theme-select" id="theme-select-mobile" title="{{ T " switchTheme" }}">
<select class="color-theme-select" id="theme-select-mobile" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
<option value="light">{{ T "Light" }}</option>
<option value="dark">{{ T "Dark" }}</option>
<option value="black">{{ T "Black" }}</option>
<option value="auto">{{ T "Auto" }}</option>
</select>
</button>
{{- else -}}
<button class="menu-item theme-switch" title="{{ T " switchTheme" }}">
<button class="menu-item theme-switch" {{ printf "aria-label=%q" (T "switchTheme") | safeHTMLAttr }}>
{{ partial "plugin/fontawesome.html" (dict "Style" "solid" "Icon" "adjust") }}
</button>
{{- end -}}
Expand Down

0 comments on commit 4cc9378

Please sign in to comment.