Skip to content

Commit

Permalink
fix: aria label for mobile menu
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbrusegard committed Feb 9, 2024
1 parent f8dc9f4 commit e7f637b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"layout": {
"hackerspaceHome": "Hackerspace homepage",
"navigationMenu": "Navigation menu",
"news": "News",
"events": "Events",
"about": "About",
Expand Down
1 change: 1 addition & 0 deletions messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"layout": {
"hackerspaceHome": "Hackerspace hjemmeside",
"navigationMenu": "Navigasjonsmeny",
"news": "Nyheter",
"events": "Hendelser",
"about": "Om oss",
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function Header() {
<MobileSheet
className='flex md:hidden'
t={{
navigationMenu: t('navigationMenu'),
news: t('news'),
events: t('events'),
about: t('about'),
Expand Down
8 changes: 7 additions & 1 deletion src/components/layout/MobileSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
type MobileSheetProps = {
className?: string;
t: {
navigationMenu: string;
news: string;
events: string;
about: string;
Expand All @@ -29,7 +30,12 @@ function MobileSheet({ className, t }: MobileSheetProps) {
return (
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger asChild>
<Button className={className} variant='ghost' size='icon'>
<Button
className={className}
variant='ghost'
size='icon'
aria-label={t.navigationMenu}
>
<Menu className='h-5 w-5' />
</Button>
</SheetTrigger>
Expand Down

0 comments on commit e7f637b

Please sign in to comment.