-
-
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
a11y: jump to main content doesn't work without JS #6411
Comments
Discovered in tauri-apps/tauri-docs#307 |
Will be fixed by #5822 The others are valid issues. Thanks for reporting. |
Only the linked color contrast is fixed by #5822 (Used the link preview https://deploy-preview-5822--docusaurus-2.netlify.app/docs/styling-layout/) |
Indeed, my message says that only the quoted problem will be fixed😆 Maybe I didn't make it clear enough... |
The outline is moved to JS logic in #3626. Apparently, the fix here would be to use @locriacyber was wondering, why would someone needing accessibility aid use a website without JavaScript? I was discussing this with some other front-end developers, and seems the consensus is that JavaScript is necessary for a lot of a11y features, unless you rely on experimental WCAG features. a11y and browser compatibility—we have to make a compromise. |
We fixed the focus outline normally @locriacyber , please let us know if it doesn't work We'll keep this issue open for the remaining fixes. |
It's a separate issue. The browser default is to underline links when focused. This feature only needs CSS. The outline is visible now. |
@lex111 Wonder what's your idea on this issue? Should we use programmatic focus, or should we simply use a link to an element ID? Other sites I researched (like NYT and GitHub) seem to use an anchor link. GitHub would instantly erase the hash from the location if JS is enabled. |
Initially I didn't add explicit identifiers to try to make the STC button as workable as possible on any page. You could try to add identifiers that are resolves this issue, but why would anyone use a site with disabled JS, I still don't get it? |
Me neither 😅 Apparently there would always be a11y features that are only available with JS, but this one seems solvable without JS, and other sites seem to handle it without JS. About "workable on any page", we currently focus to |
Not so sure about that, but most likely yes. |
|
React 18 has a |
@Josh-Cena @slorber I would like to pick up this issue, but have a few clarifying questions:
|
Something to consider:
For some pages, like the docs, it leads to slightly different behaviors with/without JS. Test page: https://deploy-preview-8204--docusaurus-2.netlify.app/docs/ With JS: the document markdown content gets focused on first tab ( Without JS: the docs sidebar get focused on first tab (layout children, fallback behavior) That is likely not a big deal. For now, I'd rather avoid changing the historical JS behavior ("focus main in priority") for retro compatibility. The noJS behavior we are introducing in #8204 is probably a good enough improvement already. |
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
#
, which isn't doing anything when Javascript isn't available.Steps to reproduce
Expected behavior
Implied in Description
Actual behavior
Implied in Description
Your environment
No response
Reproducible demo
https://docusaurus.io/docs
Self-service
The text was updated successfully, but these errors were encountered: