Improve accessibility

This commit is contained in:
Kevin Kandlbinder 2021-12-06 15:49:38 +00:00 committed by GitHub
parent e56ca5010c
commit b0e1d04030
4 changed files with 11 additions and 1 deletions

View file

@ -101,6 +101,7 @@ const Navigation = ({ isHome }) => {
toggled={offscreenNavActive}
rounded
size={30}
label={t("openMenu")}
/>
</div>
</nav>

View file

@ -8,6 +8,7 @@ import * as styles from "./navigation.module.scss";
import { X } from "lucide-react";
const OffScreenNav = ({ active, close }) => {
const { t } = useTranslation();
if (typeof document === "undefined") return <></>;
return createPortal(
@ -17,7 +18,11 @@ const OffScreenNav = ({ active, close }) => {
}
>
<div className={styles.inner}>
<button className={styles.close} onClick={close}>
<button
className={styles.close}
onClick={close}
aria-label={t("closeMenu")}
>
<X />
</button>
<span>