a11y: add lang attribute for language selector #307

This commit is contained in:
Sören Weber 2022-10-04 23:52:50 +02:00
parent 5f34d107d0
commit da25f7d13f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -68,9 +68,9 @@
{{- range $siteLanguages }}
{{- if eq $translation.Lang .Lang }}
{{- if eq $pageLang .Lang }}
<option id="{{ $translation.Language }}" value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
<option lang="{{ $translation.Lang }}" id="{{ $translation.Lang }}" value="{{ $translation.RelPermalink }}" selected>{{ .LanguageName }}</option>
{{- else }}
<option id="{{ $translation.Language }}" value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
<option lang="{{ $translation.Lang }}" id="{{ $translation.Lang }}" value="{{ $translation.RelPermalink }}">{{ .LanguageName }}</option>
{{- end }}
{{- end }}
{{- end }}