Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: lib
Choose a base branch
from

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