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

Menu/Select/Dropdown - considering refactoring focus logic #11025

Open
thatblindgeye opened this issue Sep 19, 2024 · 0 comments
Open

Menu/Select/Dropdown - considering refactoring focus logic #11025

thatblindgeye opened this issue Sep 19, 2024 · 0 comments
Labels
Post v6 Tech debt improvements to code that do not affect either user or product developers’ experience.

Comments

@thatblindgeye
Copy link
Contributor

Describe the enhancement or change
We should consider refactoring the focus logic in these 3 components. One suggestion that had been brought up was removing/moving focus when a Menu Item is hovered (similar to how a native select element does), but that depends if we want to go that route or keep the existing, intended behavior that more closely resembles this ARIA APG select example.

Other possible suggestions:

  • Add a prop to allow consumers to customize the selectors that can be focused in the menuRef?.current?.querySelector call
  • Adding a prop to prevent autofocus on mouse click
    • This would require us to add logic to handle moving into the Menu via Up/Down arrow keys; another way would be to update the onOpenChangeKeys array to only "Escape", so that Tab could be used to get into the Menu
  • Refactor the logic so that either the first selected item is focused, otherwise the first item is selected

Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?

Any other information?

@thatblindgeye thatblindgeye added Tech debt improvements to code that do not affect either user or product developers’ experience. Post v6 labels Sep 19, 2024
@tlabaj tlabaj added this to the Prioritized Backlog milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Post v6 Tech debt improvements to code that do not affect either user or product developers’ experience.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants