From d3c19d83fbced2de760316cccc68a5b6c0e30492 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Sat, 8 Jun 2024 00:37:13 +0800 Subject: [PATCH] Use ariaExpanded method for navigation toggle function --- src/_includes/global/navbar.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_includes/global/navbar.njk b/src/_includes/global/navbar.njk index a000d69c..264b45b4 100644 --- a/src/_includes/global/navbar.njk +++ b/src/_includes/global/navbar.njk @@ -104,7 +104,7 @@ }; const toggleNavigation = () => { - const open = navbarToggle.getAttribute("aria-expanded"); + const open = navbarToggle.ariaExpanded; open === "false" ? openNavigation() : closeNavigation(); }