a11y: make the sidebar button a <button>#14326
Open
hugovk wants to merge 3 commits intosphinx-doc:masterfrom
Open
a11y: make the sidebar button a <button>#14326hugovk wants to merge 3 commits intosphinx-doc:masterfrom
<button>#14326hugovk wants to merge 3 commits intosphinx-doc:masterfrom
Conversation
Contributor
Author
|
The ty and 3.15 failures are unrelated and also occur in |
gastmaier
approved these changes
Mar 4, 2026
gastmaier
left a comment
There was a problem hiding this comment.
Welcome change, useful for both keyboard savvys and people with disabilities :)
timhoffm
reviewed
Mar 6, 2026
Contributor
timhoffm
left a comment
There was a problem hiding this comment.
This is fundamentally reasonable. However, it is a breaking change for downstream templates.
This will beak users who have styled the button with a div#sidebarbutton CSS filter, e.g. https://github.com/search?q=div%23sidebarbutton+language%3ACSS+NOT+is%3Afork&type=code
This needs a prominent change note and advice to change the style filter to #sidebarbutton.
Contributor
Author
|
Added! I put 9.2.0 as the version, but I don't mind if this needs a major bump. Some other semantic improvements have been done as bug fixes: #13689. |
timhoffm
approved these changes
Mar 6, 2026
hugovk
commented
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The sidebar button should be a semantic
<button>and not a<div>.This is needed for accessibility via keyboard and assistive technology.
For example, try this before and after this fix:
Then press tab repeatedly.
Before, the
<div>"button" can not be selected: _build-master.zipAfter, the real
<button>can be selected, and you can press space to open and close the side menu: _build-fixed.zipReferences