Skip to content
Snippets Groups Projects
Commit 7eb9cab0 authored by Georg Krause's avatar Georg Krause Committed by Georg Krause
Browse files

fix(a11y): Make language switch accessible

parent 5a96f91c
No related branches found
No related tags found
1 merge request!64Start migration to pelican
...@@ -6,15 +6,16 @@ ...@@ -6,15 +6,16 @@
float: left; float: left;
} }
a.language-switch { span.language-switch {
width: 100%;
padding-right: 30px !important; padding-right: 30px !important;
} }
a.language-switch:active { span.language-switch:active {
background-color: var(--fw-gray-700); background-color: var(--fw-gray-700);
} }
a.language-switch::after { span.language-switch::after {
content: "\f078"; content: "\f078";
font: normal normal normal 14px/1 ForkAwesome; font: normal normal normal 14px/1 ForkAwesome;
position: absolute; position: absolute;
...@@ -22,10 +23,12 @@ ...@@ -22,10 +23,12 @@
} }
input[type=checkbox]#language-switch { input[type=checkbox]#language-switch {
display: none; position: absolute;
left: -20000px;
} }
.language-switch ul { .language-switch ul {
width: 100%;
display: none; display: none;
background-color: var(--fw-gray-700); background-color: var(--fw-gray-700);
position: absolute; position: absolute;
...@@ -48,10 +51,13 @@ ...@@ -48,10 +51,13 @@
</style> </style>
{% if lang_siteurls %} {% if lang_siteurls %}
<label for="language-switch"> <label for="language-switch">
<a class="funkwhale button is-outline language-switch">{{ DEFAULT_LANG | lang_name }}</a> <span class="funkwhale button is-outline language-switch">{{ DEFAULT_LANG | lang_name }}</span>
</label> </label>
<input type="checkbox" id="language-switch" name="language-switch"> <input type="checkbox"
<ul> id="language-switch"
name="language-switch"
aria-label="Select language">
<ul tabindex="-1">
{% for lang, url in lang_siteurls.items() %} {% for lang, url in lang_siteurls.items() %}
{% if not lang == DEFAULT_LANG %} {% if not lang == DEFAULT_LANG %}
<li> <li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment