Skip to content

Add support for making tags focusable for improved assistive technologies support#398

Open
sunnywalker wants to merge 3 commits intomichelf:libfrom
sunnywalker:lib
Open

Add support for making tags focusable for improved assistive technologies support#398
sunnywalker wants to merge 3 commits intomichelf:libfrom
sunnywalker:lib

Conversation

@sunnywalker
Copy link
Contributor

This article, local link targets must be focusable to prevent accessibility issues, suggests that focus is lost when local link anchors are not focusable, such as headings with ids. This pull request adds support for, by default, making headings with id attributes focusable via a tabindex="-1" attribute.

The implementation uses a class variable to allow overriding which tags are so enabled in a child class.

While this will change existing rendering, it will not break anything--headings with ids will continue to work as before, just with the added attribute.

link targets should be focusable for best assistive technologies support by adding tabindex="-1" (which also keeps them out of the tab indexing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant