-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Use CSS to outline focused code blocks #6077
Comments
Hi, this is intended behavior, added here: #3649 The rationale is that some code blocks are horizontally scrollable, so in order to scroll them they have to be focusable. However, I do acknowledge that the outline missing in FF is problematic. I guess we would manually add CSS to highlight the focus. |
Thank you for your answer. I didn't think about that, it's useful indeed. Do you want me to rename this issue, or close it and open a new one for the outline issue ? |
If you are using Google Chrome you will probably never have problems seeing the focused element when navigating with the keyboard, because Chrome is adding an additional visual outline independently from the CSS Firefox (and probably other browsers) don't do that, so here as the CSS outline is not visible when the The outline is not visible on non-Chrome browsers because:
|
Ah I see, thanks for the explanation! Are you currently working on this or can I start? |
You can start 😉 |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When navigating with the keyboard in the documentation, the focus is going on code blocks
<pre>
tags because of the tabindex on it.With this behavior we have to tab twice for each code block: once for the code block itself (which is not an interactive element as notified by eslint), and once to be on the copy button which is normal.
On firefox it's even worse because the focused
<pre>
tag is not outlined, so I don't see the focus when it's there.Steps to reproduce
The behavior can be reproduced in the documentation part of the docusaurus.io website, for example in installation.
Just go there and navigate with the Tab button several times to notice that the tab is going to the code block and the copy button each time.
Expected behavior
I expect the focus not to go to the
<pre>
tag.Actual behavior
The focus goes to the
<pre>
tag.Your environment
No response
Reproducible demo
No response
Self-service
The text was updated successfully, but these errors were encountered: