Add landmarks (#564)

Use HTML semantic elements to set the landmarks of the page.

This is helpful for assistive technologies to determine the different regions of content. In our case it's useful for jumping between the different islands that we use to group the form controls.
This commit is contained in:
Guillermo Peralta Scura 2020-01-26 17:14:31 -03:00 committed by GitHub
parent fc350f2ecd
commit 67eca2bda1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 757 additions and 697 deletions

View file

@ -1,4 +1,5 @@
import React from "react";
import { useTranslation } from "react-i18next";
export function LanguageList<T>({
onClick,
@ -9,12 +10,15 @@ export function LanguageList<T>({
onClick: (value: string) => void;
currentLanguage: string;
}) {
const { t } = useTranslation();
return (
<React.Fragment>
<select
className="language-select"
onChange={({ target }) => onClick(target.value)}
value={currentLanguage}
aria-label={t("buttons.selectLanguage")}
>
{languages.map(language => (
<option key={language.lng} value={language.lng}>

View file

@ -51,6 +51,7 @@ export function LockIcon(props: LockIconProps) {
id={props.id}
onChange={props.onChange}
checked={props.checked}
aria-label={props.title}
/>
<div className="ToolIcon__icon">
{props.checked ? ICONS.CHECKED : ICONS.UNCHECKED}

File diff suppressed because it is too large Load diff