-
Notifications
You must be signed in to change notification settings - Fork 32
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
Query Filter: After opening a query-filter you should be able to type a letter and jump to an item in that list. #541
Comments
I think it'd even more useful if it was a search. We could use the |
I still think it's relevant, but for that case, the filtering would be nice. 👍 |
Do you mean that the focusing is still relevant? I think that'd happen as a byproduct of the list being filtered, wouldn't it? https://wordpress.github.io/gutenberg/?path=/docs/components-comboboxcontrol--docs Now that I look closer, though,
We could use selectWoo, or maybe the latest version of Select2. IIRC it's fixed a lot of the a11y isues that caused selectWoo to fork it. I'm guessing we'd need to change the markup quite a bit, though, and it might conflict w/ the Interactivity API 🤔 |
We could always go back to a native select element 🧌 When building
I think we could do this with the interactivity API, watch for keypresses while the dropdown is open, and move the focus to the first matching element. It's not a search/filtering items, just moving focus. The trick would be matching native behavior (eg, when you type multiple characters, when nothing is found, etc). |
With HTML
<select>
component, you can open the select and type a letter which will move the focus down to the first matching item. This is useful for long list, most commonly a list of countries.Acceptance Criteria
Given the following QueryFilter dropdown with the following items:
r
, my focus should move down tor
The text was updated successfully, but these errors were encountered: