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 "skip to main content" a11y feature #12407

Open
kaycebasques opened this issue Jun 3, 2024 · 0 comments · May be fixed by #12408
Open

Add "skip to main content" a11y feature #12407

kaycebasques opened this issue Jun 3, 2024 · 0 comments · May be fixed by #12408
Labels
html theme type:enhancement enhance or introduce a new feature

Comments

@kaycebasques
Copy link
Contributor

kaycebasques commented Jun 3, 2024

Describe the bug

Core Sphinx themes (alabaster, basic, etc.) are missing a simple but important a11y feature - easy Tab based navigation

How to Reproduce

  1. Go to https://www.sphinx-doc.org/en/master/index.html
  2. Keep pressing Tab. Notice how focus goes from the logo to the breadcrumbs, then the searchbox, then the site nav, etc. This is very unfriendly to people who rely on Tab-based keyboard navigation of Sphinx docs sites

(This is just one concrete example. You can try out the workflow on other sites based off alabaster, basic, sphinx_rtd_theme, etc.)

Compare this with a Google SERP:

  1. Go to https://www.google.com/search?q=sphinx-doc
  2. Press Tab. Notice that the first option is a link that says "skip to main content". Pressing Enter jumps focus to the main content so that you don't have to tab through all the boilerplate links

Wikipedia uses the same pattern as Google SERP: https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)

Environment Information

This feature is missing at least from basic, alabaster, and sphinx_rtd_theme... and probably lots more

Sphinx extensions

N/A

Additional context

I will push up a PR in a bit demonstrating the fix. I'm happy to take it on and try to fix this across all the core themes

@kaycebasques kaycebasques linked a pull request Jun 3, 2024 that will close this issue
@chrisjsewell chrisjsewell linked a pull request Jun 4, 2024 that will close this issue
@picnixz picnixz added type:enhancement enhance or introduce a new feature html theme and removed type:bug labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html theme type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants