From c7dd4709d9a5eb5925fbcf20210673db5d3ff341 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 27 Oct 2023 23:00:54 +0100 Subject: [PATCH] add aria-labels --- src/components/Avatar.tsx | 1 - src/components/Navbar.tsx | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/Avatar.tsx b/src/components/Avatar.tsx index 38f777c..95ba2bd 100644 --- a/src/components/Avatar.tsx +++ b/src/components/Avatar.tsx @@ -22,7 +22,6 @@ export default function Avatar({ src={url} width={size} height={size} - priority /> ); diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 3e8649b..9a50cc5 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -16,13 +16,15 @@ interface ButtonProps { text: string; icon?: JSX.Element; href?: string; + ariaLabel: string; children?: React.ReactNode; } -function NavbarButton({ text, icon, href, children }: ButtonProps) { +function NavbarButton({ text, icon, href, ariaLabel, children }: ButtonProps) { return (
@@ -49,6 +51,7 @@ export default function Navbar() {
{settingsStore !== undefined && settingsStore.player && ( )} - }> + } + > {settingsStore?.friends.length == 0 ? (

No friends, add someone!

) : ( @@ -92,11 +99,13 @@ export default function Navbar() { />
} href="/ranking/global/1" /> } href="/analytics" @@ -105,11 +114,13 @@ export default function Navbar() {
} href="/search" /> } href="/settings"