feat(a11y): add aria-current to navigation

This commit is contained in:
Stefan Imhoff
2025-02-04 20:07:43 +01:00
parent bd9e52d3e7
commit 404d477e7f

View File

@@ -10,8 +10,10 @@
links.forEach((link) => {
if (link.getAttribute('href') === currentPath) {
link.classList.add('is-active');
link.setAttribute('aria-current', 'page');
} else {
link.classList.remove('is-active');
link.removeAttribute('aria-current');
}
});
}