-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
The current hash-link setup causes endless problems when a page link is pasted into google translate
Try blog/releases/3.8 in french for example and you can see how that messes up the headings and sub-headings. Most of the title text ends up getting hidden and there are breaks in the middle.
The links in the side bar are fine. You can right click and copy link https://docusaurus.io/blog/releases/3.8#docusaurus-faster sans probleme.
I have done a lot of looking:
The links contained in #9222
ie, are-your-anchor-links-accessible
seem to have been formative to much of Docusaurus hash-link decision making, but this article does go on to say that is not a perfect answer and does go on to mention Google Translate problems, giving a link to here aria-label-is-a-xenophobe on the topic.
Now given that only 18% of the world speak English and that the sidebar produces perfectly satisfactory sublinks that can be copied, I think that an option to turn off the hash-link feature is something that is needed.
After seeing the comments to yet another hash-link problem here#10634 I came up with a workaround:
.hash-link {
display: none;
}
.hash-link::before {
display: none;
}
.hash-link:focus,
*:hover > .hash-link {
display: none;
}So, this an issue. The underlying fundamental issue may lie with Google or even with W3.org but it is still something that can be fixed easily here.
If people can test pasting this into custom.css and no-one has any problems with Mac Voice Over and other apps, and if Sébastien is okay with this, I'll write a PR for the Style and Layout Docs
Reproducible demo
No response
Steps to reproduce
Expected behavior
Try the translate button top right here https://qqxproject.org/docs/Translation
Actual behavior
Hidden Title Text, in blue, only visible on mouse over. In some cases words are missing altogether.
Your environment
Latest Chrome, Firefox, Edge ...
Self-service
- I'd be willing to fix this bug myself.
