Use ariaExpanded method for navigation toggle function

This commit is contained in:
Helen Chong 2024-06-08 00:37:13 +08:00
parent 5117609be4
commit d3c19d83fb
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@
};
const toggleNavigation = () => {
const open = navbarToggle.getAttribute("aria-expanded");
const open = navbarToggle.ariaExpanded;
open === "false" ? openNavigation() : closeNavigation();
}