Skip to content

Commit

Permalink
chore(release): 3.0.3
Browse files Browse the repository at this point in the history
## [3.0.3](v3.0.2...v3.0.3) (2023-06-27)

### Bug Fixes

* remove aria-expanded attribute from section tag in search result page ([88daf87](88daf87))
  • Loading branch information
zd-svc-github-copenhagen-theme committed Jun 27, 2023
1 parent 1a49363 commit 6cdfea6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.0.3](https://github.com/zendesk/copenhagen_theme/compare/v3.0.2...v3.0.3) (2023-06-27)


### Bug Fixes

* remove aria-expanded attribute from section tag in search result page ([88daf87](https://github.com/zendesk/copenhagen_theme/commit/88daf87a9afa5b9eb686591d91b62e3e57f9101d))

## [3.0.2](https://github.com/zendesk/copenhagen_theme/compare/v3.0.1...v3.0.2) (2023-06-08)


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Copenhagen",
"author": "Zendesk",
"version": "3.0.2",
"version": "3.0.3",
"api_version": 3,
"default_locale": "en-us",
"settings": [
Expand Down
8 changes: 3 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@

function toggleNavigation(toggle, menu) {
const isExpanded = menu.getAttribute("aria-expanded") === "true";
menu.setAttribute("aria-expanded", !isExpanded);
toggle.setAttribute("aria-expanded", !isExpanded);
}

function closeNavigation(toggle, menu) {
menu.setAttribute("aria-expanded", false);
function closeNavigation(toggle) {
toggle.setAttribute("aria-expanded", false);
toggle.focus();
}
Expand All @@ -35,7 +33,7 @@
menuList.addEventListener("keyup", (event) => {
if (event.keyCode === ESCAPE) {
event.stopPropagation();
closeNavigation(menuButton, menuList);
closeNavigation(menuButton);
}
});

Expand All @@ -56,7 +54,7 @@
element.addEventListener("keyup", (event) => {
console.log("escape");
if (event.keyCode === ESCAPE) {
closeNavigation(toggle, element);
closeNavigation(toggle);
}
});
});
Expand Down

0 comments on commit 6cdfea6

Please sign in to comment.