Skip to content

Enable keyboard navigation#1784

Open
abitrolly wants to merge 1 commit intopython:mainfrom
abitrolly:patch-1
Open

Enable keyboard navigation#1784
abitrolly wants to merge 1 commit intopython:mainfrom
abitrolly:patch-1

Conversation

@abitrolly
Copy link
Copy Markdown

This makes it easy to browse the doc without mouse.

https://pradyunsg.me/furo/customisation/#navigation-with-keys

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 CPython devguide | 🛠️ Build #32324346 | 📁 Comparing bd34ffc against latest (76bb6bb)

  🔍 Preview build  

1 files changed
± versions/index.html

@hugovk
Copy link
Copy Markdown
Member

hugovk commented Apr 19, 2026

Nice little shortcut, but I'm concerned this will interfere with keyboard handling for people using assistive tech such as screen readers.

https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/ includes:

So, screen reader users will commonly expect that pressing the right arrow key will expand a collapsed node.

https://webaim.org/techniques/keyboard/ has examples where / keys are needed.

@abitrolly
Copy link
Copy Markdown
Author

abitrolly commented Apr 19, 2026

@hugovk now this gets tricky - DevGuide actually uses collapsible navigation tree for menu, but.. it doesn't conform to the guidelines itself. I tried several way to expand it on https://devguide.python.org/getting-started/ - right/left/space don't work, tab focus doesn't jump to down arrow. Enter just navigates to the section index page. So the menu tree is not ARIA compatible, and enabling keyboard navigation won't break it.

If somebody decides to make the devguide tree element ARIA compatible, the setting doesn't prevent more specific key handler to do the ARIA thing and prevent default popping to more generic document handler, where the shortcuts are defined.

https://github.com/sphinx-doc/sphinx/blob/cc7c6f435ad37bb12264f8118c8461b230e6830c/sphinx/themes/basic/static/doctools.js#L106

@abitrolly abitrolly changed the title Enable keybard navigation Enable keyboard navigation Apr 19, 2026
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.

2 participants