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

Consider adding focus-visible package #550

Open
shanberg opened this issue Aug 25, 2019 · 1 comment
Open

Consider adding focus-visible package #550

shanberg opened this issue Aug 25, 2019 · 1 comment
Assignees

Comments

@shanberg
Copy link
Contributor

:focus-visible is a new-ish css pseudo-class that is designed to apply to focused elements for keyboard users, not apply for mouse users. It isn't well-supported yet, but the polyfill is popular and small, 10k unminified.

We have a couple complicated css selectors in the library right now that try to avoid the focus issue, but they're gross: :focus:not(:hover) and don't provide the full functionality of :focus-visible.

From the GitHub project:

Based on the proposed CSS :focus-visible pseudo-selector, this prototype adds a focus-visible class to the focused element, in situations in which the :focus-visible pseudo-selector should match.

The package: https://www.npmjs.com/package/focus-visible

I'm interested in your thoughts, @tilleryd, on adding a new package to the library.

@tilleryd
Copy link
Contributor

I'm ok with this package. Hopefully Chrome will support it soon, it's not clear what the hold up is. Since Edge is moving to Chromium, eventually our top 3 browsers will support it natively.

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