-
-
Notifications
You must be signed in to change notification settings - Fork 446
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 :focus-visible
instead of :focus
in stylesheets
#390
Comments
Has there been any updates on this @davwheat or have you been able to find a work around? I need to accomplish exactly what you described but applying the |
I personally ended up switching to another Tabs library for my project. I wrote a wrapping component so it was quite easy to swap out: https://github.com/davwheat/personal-portfolio/blob/a7a932e355893a23f9187a92648a4af6d549e8aa/src/components/Tabs.tsx |
The styles have changed since this was reported, we do not set any style on focus anymore. I tried |
We should use
:focus-visible
instead of:focus
to style the tabs on focus. This pseudoclass is only true when focus is gained via keyboard navigation, not by any other method, and is how focus is handled on native elements, like buttons and links.This isn't supported in Safari, so we need to perform some acrobatics to keep the old styles working in that browser.
Read more:
The text was updated successfully, but these errors were encountered: