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

Shift renders focus ring #148

Open
michax opened this issue Jun 1, 2018 · 3 comments
Open

Shift renders focus ring #148

michax opened this issue Jun 1, 2018 · 3 comments
Labels

Comments

@michax
Copy link

michax commented Jun 1, 2018

During testing I've noticed that that shift press alone activates focus ring. It doesn't seem like correct behaviour. I would expect it to only appear after tab or tab + shift.

@robdodson
Copy link
Collaborator

Hey @michax, we currently turn on focus-visible anytime a user presses any keyboard key. Our thinking is that this is a signal that the user is in "keyboard mode." Can you tell me a bit more about what you were building that caused you to see this as an error? We're always interested in use cases to help us shape the design.

@plinehan
Copy link
Contributor

plinehan commented Jun 19, 2018

Just chiming in, but shift (or any keyboard event) also causes Chrome's default focus ring to appear, as well.

Personally, it seems somewhat aggressive. Consider the case where a user is mouse-navigating and then starts entering a keyboard shortcut, e.g. MOD-A to select all text. The focused element becomes highlighted at the start, the instant MOD is first pressed. For someone who hasn't been using the keyboard, it seems incongruous.

@robdodson
Copy link
Collaborator

I agree that it may be a bit aggressive. @alice and I were chatting about it this past week. It's unclear (to me at least) if the current behavior was a conscious decision by the Chrome team, or if it's merely a side effect of how focus ring drawing is implemented. Neither Firefox nor Safari has this same behavior, but if I recall correctly, they also don't technically focus the button when you mouse click on it, whereas Chrome does.

For now, what's in the polyfill matches the :focus-visible implementation we've been working on, so technically the polyfill is "correct"—it matches the native behavior—but I think it's up for debate whether we want to keep this behavior. Any use cases you all can provide which demonstrate that the behavior is actually distracting will be really helpful. Thank you @plinehan for the MOD-A example :)

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

No branches or pull requests

3 participants