Skip to content

Commit

Permalink
Merge pull request #724 from City-of-Helsinki/UHF-9762
Browse files Browse the repository at this point in the history
UHF-9762: Accessibility improvements for the table of contents (TOC)
  • Loading branch information
teroelonen authored Apr 5, 2024
2 parents 9946211 + cb4f6c2 commit e8210ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/helfi_toc/assets/js/tableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
}
// Create anchor links.
content.setAttribute('id', anchorName);
content.setAttribute('tabindex', '-1'); // Set tabindex to -1 to avoid issues with screen readers.
content.setAttribute('class', 'toc-focusable');
});

if (tableOfContents) {
Expand Down

0 comments on commit e8210ff

Please sign in to comment.