We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c56fb4 commit 58cddbdCopy full SHA for 58cddbd
src/components/Navbar.astro
@@ -45,6 +45,7 @@ const links = [
45
class="relative md:hidden"
46
aria-expanded="false"
47
aria-controls="mobile-nav-content"
48
+ aria-label="Open menu"
49
>
50
<div
51
class="mobile-nav-bg bg-transparent inset-0 absolute rounded-full -z-10"
@@ -119,6 +120,9 @@ const links = [
119
120
button.addEventListener("click", () => {
121
const expanded = button.getAttribute("aria-expanded") === "true";
122
button.setAttribute("aria-expanded", `${!expanded}`);
123
+ expanded
124
+ ? button.setAttribute("aria-label", "Open menu")
125
+ : button.setAttribute("aria-label", "Close menu");
126
mobileNav.setAttribute("data-open", `${!expanded}`);
127
});
128
</script>
0 commit comments