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>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
</ol>
|
||||
<div class="menu-bottom-section">
|
||||
<ol class="menu">
|
||||
{{- $currentLanguageCode := .Language.Lang -}}
|
||||
{{ if ( compare.Gt .Site.Home.AllTranslations.Len 1 ) }}
|
||||
{{ with .Site.Home.AllTranslations }}
|
||||
<li id="i18n-switch">
|
||||
{{ 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 . }}
|
||||
<option value="{{ .Permalink }}" {{ if eq .Language.Lang $currentLanguageCode }}selected{{ end }}>{{ .Language.LanguageName }}</option>
|
||||
{{ end }}
|
||||
|
@ -97,6 +98,6 @@
|
|||
<span>{{ T "darkMode" }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</div>
|
||||
</ol>
|
||||
</div>
|
||||
</aside>
|
||||
|
|
Loading…
Reference in a new issue