We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
accessibility
1 parent 2bf4be7 commit 6f5cc49Copy full SHA for 6f5cc49
1 file changed
src/assets/js/main.js
@@ -34,12 +34,16 @@ mobileButtons.forEach((button) => {
34
35
const setShowing = () => {
36
mobileButtons[0].setAttribute('aria-label', 'Close the mobile menu')
37
+ mobileButtons[0].setAttribute('aria-expanded', 'true')
38
+ mobileMenuSection.setAttribute('aria-hidden', 'false')
39
mobileMenuSection.classList.remove('not-showing')
40
setTimeout(() => documentBody.classList.add('no-scroll'), 300)
41
}
42
43
const setHidden = () => {
44
mobileButtons[0].setAttribute('aria-label', 'Open the mobile menu')
45
+ mobileButtons[0].setAttribute('aria-expanded', 'false')
46
+ mobileMenuSection.setAttribute('aria-hidden', 'true')
47
mobileMenuSection.classList.add('not-showing')
48
documentBody.classList.remove('no-scroll')
49
0 commit comments