Skip to content

Commit

Permalink
Refactor mobile menu toggler to button
Browse files Browse the repository at this point in the history
non chromium browsers did not indicate that the the mobile menu button was in focus, unlike the other menu buttons. This was because the other buttons are either link or button elements. This should align that approach which the other buttons and ensure the mobile-menu button is visually indicatin that it is in focus.
  • Loading branch information
LasseStaus committed Jun 11, 2024
1 parent d048bca commit b3a640b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/stories/Blocks/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ export const Header = (props: HeaderProps) => {
>
<div>
<div className="header__menu-navigation-mobile">
<Pagefold
isInheriting={false}
isAContainer={false}
size="small"
<button
id="header-sidebar-nav__toggle"
className="header__menu-navigation-button header__button"
compProps={{
id: "header-sidebar-nav__toggle",
"aria-controls": "sidebarNav",
"aria-expanded": "false",
role: "button",
tabIndex: 0,
}}
aria-controls="sidebarNav"
aria-expanded="false"
>
<MenuIcon />
</Pagefold>
<Pagefold
isInheriting={false}
isAContainer={false}
size="small"
className="header__menu-navigation-pagefold"
>
<MenuIcon />
</Pagefold>
</button>
<div className="header__menu-navigation-logo">
<Logo
hasImage
Expand Down
7 changes: 7 additions & 0 deletions src/stories/Blocks/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
align-items: center;
border-right: 1px solid $color__global-tertiary-1;
}
.header__menu-navigation-pagefold {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.header__menu-profile,
.header__menu-bookmarked {
Expand Down

0 comments on commit b3a640b

Please sign in to comment.