Skip to content

Commit 5a80a13

Browse files
authored
fix: Make mobile content navigation inert when closed (#437)
Resolves #403
1 parent 7fa5156 commit 5a80a13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assets/js/contentNavigation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ const initAside = () => {
1919
aside.classList.remove("o-aside--open");
2020
asideContent.removeAttribute("role");
2121
asideContent.setAttribute("aria-hidden", "true");
22+
asideContent.setAttribute("inert", "");
2223
handleBtn.setAttribute("aria-expanded", "false");
2324
overlay.classList.remove("overlay--show", "overlay--content");
2425
};
2526

2627
const openSheet = () => {
2728
isClosed = false;
2829
aside.classList.add("o-aside--open");
29-
overlay.classList.add("overlay--show", "overlay--content");
3030
asideContent.setAttribute("role", "dialog");
3131
asideContent.setAttribute("aria-hidden", "false");
32+
asideContent.removeAttribute("inert");
3233
handleBtn.setAttribute("aria-expanded", "true");
34+
overlay.classList.add("overlay--show", "overlay--content");
3335
};
3436

3537
if (isMobile()) {

0 commit comments

Comments
 (0)