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

Make version picker keyboard-controllable #1160

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jonels-msft
Copy link
Contributor

@jonels-msft jonels-msft commented Jun 8, 2021

Changes the flyout opener from <span> to <button> to make it focusable by the keyboard. Maintains an aria-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.

Comment on lines -4 to +9
<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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonels-msft
Copy link
Contributor Author

@Blendify there you go.

BTW, what's the purpose of that versions.html file?

@jonels-msft
Copy link
Contributor Author

(rebased because it looked out of date with master)

@Blendify
Copy link
Member

@Blendify there you go.

BTW, what's the purpose of that versions.html file?

This is used to simulate the version picker in your local dev environment. This should solve your comment above:

I couldn't see that change reflected in my running dev environment.

@jonels-msft
Copy link
Contributor Author

@Blendify I made the update you suggested, can you review again please?

@agjohnson agjohnson added this to the 2.0 milestone Jun 24, 2021
jonels-msft added a commit to jonels-msft/sphinx_rtd_theme_citus that referenced this pull request Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants