mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
fix(sidebar): improve accessibility of sidebar bottom menu (#925)
* fix(menu): <ol> containing other than <li>, <script> or <template> elements * fix(menu): add title to language select menu
This commit is contained in:
parent
65cd7f586f
commit
5b0d6fdf7d
1 changed files with 6 additions and 5 deletions
|
@ -74,14 +74,15 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</ol>
|
||||||
<div class="menu-bottom-section">
|
<div class="menu-bottom-section">
|
||||||
|
<ol class="menu">
|
||||||
{{- $currentLanguageCode := .Language.Lang -}}
|
{{- $currentLanguageCode := .Language.Lang -}}
|
||||||
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
|
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
|
||||||
{{ with .Site.Home.AllTranslations }}
|
{{ with .Site.Home.AllTranslations }}
|
||||||
<li id="i18n-switch">
|
<li id="i18n-switch">
|
||||||
{{ partial "helper/icon" "language" }}
|
{{ partial "helper/icon" "language" }}
|
||||||
<select name="language" onchange="window.location.href = this.selectedOptions[0].value">
|
<select name="language" title="language" onchange="window.location.href = this.selectedOptions[0].value">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -97,6 +98,6 @@
|
||||||
<span>{{ T "darkMode" }}</span>
|
<span>{{ T "darkMode" }}</span>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</ol>
|
||||||
</ol>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
Loading…
Reference in a new issue