keyboard nav program

This commit is contained in:
isUnknown 2024-09-20 10:14:43 +02:00
parent a470d6322c
commit 24f6606c2c
8 changed files with 49 additions and 24 deletions

View file

@ -2,6 +2,12 @@ let handleClick;
function expandNav(nodes) {
nodes.expandedNav.style = "transition: top 0.6s var(--curve-quick-slow);";
nodes.expandedNav
.querySelectorAll("[tabindex]:not(.expanded-nav__logo-link)")
.forEach((element) => {
console.log();
element.setAttribute("tabindex", "0");
});
setTimeout(() => {
nodes.expandedNav.classList.add("open");