Added aria labels to language and version selector

This commit is contained in:
squidfunk
2021-06-06 15:11:04 +02:00
parent 2a5ba14ebe
commit 11fcf4f0ab
16 changed files with 41 additions and 20 deletions

View File

@@ -57,6 +57,7 @@ export type Translation =
| "search.result.more.one" /* 1 more on this page */
| "search.result.more.other" /* # more on this page */
| "search.result.term.missing" /* Missing */
| "select.version.title" /* Version selector */
/**
* Translations

View File

@@ -20,7 +20,7 @@
* IN THE SOFTWARE.
*/
import { configuration } from "~/_"
import { configuration, translation } from "~/_"
import { h } from "~/utilities"
/* ----------------------------------------------------------------------------
@@ -85,7 +85,10 @@ export function renderVersionSelector(versions: Version[]): HTMLElement {
/* Render version selector */
return (
<div class="md-version">
<button class="md-version__current">
<button
class="md-version__current"
aria-label={translation("select.version.title")}
>
{active.title}
</button>
<ul class="md-version__list">