Skip to content

Commit

Permalink
Merge pull request #1167 from w3bdesign/develop
Browse files Browse the repository at this point in the history
a11y
  • Loading branch information
w3bdesign authored Oct 28, 2023
2 parents 5921ac7 + 2771685 commit 1fa4cf8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/components/Footer/Hamburger.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ const Hamburger = () => {
onClick={() => {
setisExpanded((prevExpanded) => !prevExpanded);
}}
onKeyDown={(event) => {
// 'Enter' key or 'Space' key
if (event.key === 'Enter' || event.key === ' ') {
setisExpanded((prevExpanded) => !prevExpanded);
}
}}
tabIndex={0} // Make the span focusable
role="button" // Indicate the span acts as a button
>
{title}
</span>
Expand Down

1 comment on commit 1fa4cf8

@vercel
Copy link

@vercel vercel bot commented on 1fa4cf8 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.