Skip to content

Commit

Permalink
ID-48 Fix mobile menu button click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsopko committed May 18, 2023
1 parent eba9799 commit e23378c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules/
npm-debug.log
.DS_Store
.idea
.vscode
preview/
tmp/
axeReports/
Expand Down
6 changes: 3 additions & 3 deletions src/idsk/components/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Header.prototype.handleClick = function (event) {

// If a button with aria-controls, handle click
if ($toggleButton && $target) {
this.toggleClass($target, 'govuk-header__navigation--open')
this.toggleClass($toggleButton, 'govuk-header__menu-button--open')
this.toggleClass($target, 'idsk-header__navigation--open')
this.toggleClass($toggleButton, 'idsk-header__menu-button--open')

$toggleButton.setAttribute('aria-expanded', $toggleButton.getAttribute('aria-expanded') !== 'true')
$target.setAttribute('aria-hidden', $target.getAttribute('aria-hidden') === 'false')
$target.setAttribute('aria-hidden', ($target.getAttribute('aria-hidden') === 'false').toString())
}
}

Expand Down

0 comments on commit e23378c

Please sign in to comment.