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

[select] mouse focus when clicking invoker to open dropdown #1081

Open
josepharhar opened this issue Aug 7, 2024 · 0 comments
Open

[select] mouse focus when clicking invoker to open dropdown #1081

josepharhar opened this issue Aug 7, 2024 · 0 comments
Labels
select These are issues that relate to the select component

Comments

@josepharhar
Copy link
Collaborator

We previously resolved to focus the currently selected option when the datalist popover dropdown thing is opened, and that works great when invoking the popup with a keyboard but I'm not sure it is the best when clicking the invoker button with a mouse to open it because we don't render a focus ring on the newly focused option because the browser sort of thinks we are in mouse focus mode.

@una gave me feedback that it looked weird when focus is set to an option after clicking the invoker button but there is no focus ring on the newly selected option.

I see a few remedies to this problem:

  • Make the browser set focus to the newly selected option in a way that emulates keyboard focus which forces it to give a focus ring.
  • Don't focus the an option when the user clicks the invoker button with a mouse, as opposed to using the keyboard. What should be the active element in this case though...? the button? the body element? the popover element?
  • Keep it the way it is already if this is the right thing?

Any thoughts? @scottaohara

@josepharhar josepharhar added the select These are issues that relate to the select component label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
select These are issues that relate to the select component
Projects
None yet
Development

No branches or pull requests

1 participant