-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Search bar takes tab focus #400
Comments
Keyboard accessibility is a long standing thing I wanted to optimize, but I never had the time. If you come up with a good concept, I'm happy to integrate it. The problem is that the Secondly, when there are search results, Tab is mapped to Key Down while Shift+ Tab is mapped to Key Up and it wraps at the end of the search results. How would you handle that and what is the order in which you would expect it to go through the page? |
I'll talk to the accessibility expert on our team and get back to you with her suggestions. |
Looking at:
I noticed the following: Issue: The keyboard focus drops out of the search modal and continues in the site itself, without closing the modal. Issue: There is no submit button (only a button type="reset"). I think the submit action is set on the three labels for different views? A label gets no keyboard focus and is not the semantically right element for submitting Issue: There are 3 labels for="search" with no content and no associated id. Don't use a label other then in a form for describing a connected form field. |
Thanks for your input and the linked resources. That's a lot of work to do and as I said, accessibility is an important topic and I will see when I can find the time. Any help is appreciated. |
Hey @squidfunk Thanks for reading. Just saw that now, quick win: |
BTW: the search doesn't have a submit button because it's "search-as-you-type" and then you select the result which is a link to follow that is focused. |
@squidfunk |
I noticed another small thing. When you find some documents in the search you often have to press TAB/Key Down twice to focus on first result. |
See #659 for a first improval. |
Description
When I press tab, I expect to be able to navigation around the page with keyboard navigation. Instead, the search bar comes into focus when I press tab, regardless of how many times I try pressing tab again.
Is there a way to disable the JS capturing tab (and other keys) apart from not loading the entire JS file? This breaks keyboard accessibility for users on my site.
Expected behavior
Use the tab key to navigate through interactive elements on a web page.
Actual behavior
Search bar comes into focus.
Steps to reproduce the bug
Package versions
2.7.10
0.16.3
1.7.4
Project configuration
https://github.com/squidfunk/mkdocs-material/blob/master/mkdocs.yml :)
The text was updated successfully, but these errors were encountered: