mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-04-28 17:56:51 +02:00
Improve accessibility
This commit is contained in:
parent
e56ca5010c
commit
b0e1d04030
4 changed files with 11 additions and 1 deletions
|
@ -59,6 +59,8 @@
|
|||
"donatePayPal": "Über PayPal spenden"
|
||||
},
|
||||
"menu": "Menü",
|
||||
"closeMenu": "Menü schließen",
|
||||
"openMenu": "Menü öffnen",
|
||||
"language": {
|
||||
"en": {
|
||||
"name": "Englisch"
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
"donatePayPal": "Donate using PayPal"
|
||||
},
|
||||
"menu": "Menu",
|
||||
"closeMenu": "Close Menu",
|
||||
"openMenu": "Open Menu",
|
||||
"language": {
|
||||
"en": {
|
||||
"name": "English"
|
||||
|
|
|
@ -101,6 +101,7 @@ const Navigation = ({ isHome }) => {
|
|||
toggled={offscreenNavActive}
|
||||
rounded
|
||||
size={30}
|
||||
label={t("openMenu")}
|
||||
/>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue