Skip to content

Commit b3d57fd

Browse files
authored
docs: only register event listeners once (#1372)
1 parent 6da7e3f commit b3d57fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/dokka-presets/scripts/accessibility.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ function ensureNavButtonInteractable() {
7171
const navButtons = document.querySelectorAll('.navButton');
7272

7373
navButtons.forEach(function(navButton) {
74+
if (navButton.hasAttribute('aria-expanded')) {
75+
return;
76+
}
77+
7478
// Make the navButton focusable, add accessibility information
7579
navButton.setAttribute('tabindex', '0');
7680
navButton.setAttribute('role', 'button');

0 commit comments

Comments
 (0)