Skip to content

Commit

Permalink
fix(a11y): close menu focus with voice over
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer authored and AntonLantukh committed Apr 18, 2024
1 parent 1a0f357 commit bf7aa66
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
9 changes: 1 addition & 8 deletions packages/ui-react/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,7 @@ const Header: React.FC<Props> = ({
{t('skip_to_content')}
</a>
<div className={styles.menu}>
<IconButton
className={styles.iconButton}
aria-label={sideBarOpen ? t('close_menu') : t('open_menu')}
aria-controls="sidebar"
aria-haspopup="true"
aria-expanded={sideBarOpen}
onClick={() => onMenuButtonClick()}
>
<IconButton className={styles.iconButton} aria-label={t('open_menu')} aria-expanded={sideBarOpen} onClick={() => onMenuButtonClick()}>
<Icon icon={Menu} />
</IconButton>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ exports[`<Header /> > renders header 1`] = `
class="_menu_f4f7a7"
>
<button
aria-controls="sidebar"
aria-expanded="false"
aria-haspopup="true"
aria-label="open_menu"
class="_iconButton_0fef65 _iconButton_f4f7a7"
type="button"
Expand Down Expand Up @@ -111,9 +109,7 @@ exports[`<Header /> > renders header with nav buttons 1`] = `
class="_menu_f4f7a7"
>
<button
aria-controls="sidebar"
aria-expanded="false"
aria-haspopup="true"
aria-label="open_menu"
class="_iconButton_0fef65 _iconButton_f4f7a7"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ exports[`<Layout /> > renders layout 1`] = `
class="_menu_f4f7a7"
>
<button
aria-controls="sidebar"
aria-expanded="false"
aria-haspopup="true"
aria-label="open_menu"
class="_iconButton_0fef65 _iconButton_f4f7a7"
type="button"
Expand Down

0 comments on commit bf7aa66

Please sign in to comment.