Skip to content
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

Button 'Читать' (Read the book) does not have an outline when focusing with the Tab-key #39

Open
rrramble opened this issue Oct 24, 2024 · 4 comments

Comments

@rrramble
Copy link

When focusing with the Tab-key on the main page, a visual button 'Читать' (Read the book) does not have an outline or other visual representation (i.e., shadow, background change, or zoom).

This is an accessibility issue related to Level A (minimal level) of WCAG paragraph 2.4.7.

Thank you!

@rrramble rrramble changed the title Button (link) 'Читать' (Read the book) does not have an outline when focusing with TAB-key Button 'Читать' (Read the book) does not have an outline when focusing with the Tab-key Oct 24, 2024
@Mihonarium
Copy link
Owner

There are weird Docusaurus bugs around the outline. It's a problem, but I'm not sure how to fix it without breaking everything else.

@rrramble
Copy link
Author

rrramble commented Oct 24, 2024

It seems I have found the problem:

In /src/css/custm.css-file all .focus-visible classes should be written as :focus-visible pseudoclass.

The .focus-visible could have meaning if JS added such a class when the Tab was pressed. But JS does not add anything.

However, I find this solution a workaround because current CSS classes shut down the NATIVE outline with outline: 0 setting and then use other tools to make a PSEUDO-outline, e.g., with changing the background color, border, or shadow.

Just for reference:
--ifm-... CSS classes in this file are from the Infima Framework. However, on Infima NPM-package there is no outline: 0 setting. I conclude this setting was manually added-customized.

@rrramble
Copy link
Author

Sent a Pull request #41

@Mihonarium
Copy link
Owner

Thanks a lot for the PR!

I think in the past, Docusaurus added .focus-visible to elements in focus (facebook/docusaurus#3150).

Removing outline:0 adds outline in addition to background color change (see a preview on https://ba8550b1.hpmor-ru.pages.dev/), which is not something we'd want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants