-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make version picker keyboard-controllable #1160
base: master
Are you sure you want to change the base?
Conversation
<span class="rst-current-version" data-toggle="rst-current-version"> | ||
<button class="rst-current-version" aria-expanded="false" aria-controls="docs_versions" data-toggle="rst-current-version"> | ||
<span class="fa fa-book"> Read the Docs</span> | ||
v: {{ current_version }} | ||
<span class="fa fa-caret-down"></span> | ||
</span> | ||
<div class="rst-other-versions"> | ||
</button> | ||
<div class="rst-other-versions" id="docs_versions"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes need to be repeated in https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/_templates/layout.html#L11
@Blendify there you go. BTW, what's the purpose of that |
be4217b
to
94f6f67
Compare
(rebased because it looked out of date with master) |
This is used to simulate the version picker in your local dev environment. This should solve your comment above:
|
@Blendify I made the update you suggested, can you review again please? |
More information about the relation of elements on the page
94f6f67
to
5044458
Compare
Changes the flyout opener from
<span>
to<button>
to make it focusable by the keyboard. Maintains anaria-expanded
property so that screen readers can understand the state of the flyout.Fixes #948
Fixes #962
Note that when I changed
versions.html
I couldn't see that change reflected in my running dev environment. Instead, to test, I changed the live DOM element to a button in the browser. Perhaps there's a command I need to run to make the dev environment notice and rebuild with the change in that html file.