-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add tab index to .md-search__scrollwrap
in the search
plugin
#7193
Comments
Thanks for reporting. The region is accessible by keyboard |
Thanks for the feedback. I have created a follow up issue on the accessibility app: I am happy to close this issue while we wait on the other project, and reopen if necessary, or leave open in the meantime. Let me know your preference, or close the issue yourself. |
Thanks! Yes, I believe this is a false positive in our case, but I don't think that this can or should be solved upstream, because the accessibility checker would need to execute JavaScript to learn that the search results can be navigated. Why did we implement it that way? Because we want to keep the cursor in the input field, so the user can change the search input at any time. Making the results focusable would mean the user would have to leave the input field, and return to it to change the query – IMHO a mediocre user experience compared to what we currently have. If we can add Also note that when you tab, you'll leave the search. |
I'm closing this as working as intended, as explained in my last comment. In case we can improve the situation with additional |
Do you think adding something like |
I don't think it's acceptable, because this would hide it from screen readers. If would also silence the warning, but at the possible expense of a worse experience on a screen reader. I wouldn't recommend it. |
One thing I did not correctly understand (that you may have explained). Adding |
I'm not sure if this generalizes to all browsers. For instance, in my experience, Safari has completely different tabbing semantics than Chrome. Thus, I'm not entirely sure that this change is safe to make. |
so I was able to test this solution on Firefox, Edge and Safari, and they all behaved the same when typing a command, using arrow keys to navigate the menu, and then continue typing, without losing focus. To test this I modified the div section to |
Thanks for taking the time to test this. You can create a PR if you like. |
Thanks @squidfunk, I created this PR. |
Bug description
I am running the https://accessibilityinsights.io/ extension and I get flagged an error:
scrollable-region-focusable: Elements with scrollable content must be accessible by keyboard.
This error is flagged when enabling the
search
plugin.Adding a
tabindex="0"
to the div section<div class="md-search__scrollwrap">
removes the error.Related links
Reproduction
doh.zip
Steps to reproduce
poetry install
Browser
Edge
Before submitting
The text was updated successfully, but these errors were encountered: