mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
feat(a11y): add aria-current to navigation
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user