mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
fc350f2ecd
commit
67eca2bda1
6 changed files with 757 additions and 697 deletions
|
@ -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}>
|
||||
|
|
|
@ -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}
|
||||
|
|
1365
src/index.tsx
1365
src/index.tsx
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue