Skip to content

Commit

Permalink
docs: only register event listeners once (#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis authored Jul 29, 2024
1 parent 6da7e3f commit b3d57fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/dokka-presets/scripts/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ function ensureNavButtonInteractable() {
const navButtons = document.querySelectorAll('.navButton');

navButtons.forEach(function(navButton) {
if (navButton.hasAttribute('aria-expanded')) {
return;
}

// Make the navButton focusable, add accessibility information
navButton.setAttribute('tabindex', '0');
navButton.setAttribute('role', 'button');
Expand Down

0 comments on commit b3d57fd

Please sign in to comment.