Improve lang switch accesibility

This commit is contained in:
Alex Shpak
2020-02-10 18:39:07 +01:00
parent 72cf0968ce
commit e1d55f2b15
4 changed files with 12 additions and 9 deletions
+2 -3
View File
@@ -7,8 +7,7 @@
{{ $langs = merge $langs (dict .Language.Lang .) }}
{{ end }}
<div class="book-languages">
<div class="book-languages" tabindex="0" aria-haspopup="true">
<ul>
<li class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
@@ -18,7 +17,7 @@
<ul class="book-languages-list">
{{ range sort $langs }}
<li class="{{ if (eq $.Site.Language .Language ) }}active{{ end }}">
<li class="{{ if (eq $.Site.Language .Language) }}active{{ end }}">
<a href="{{ .Permalink }}" class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
{{ .Language.LanguageName }}