-
Notifications
You must be signed in to change notification settings - Fork 4
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
Can you select search result by keyboard? #111
Comments
Hi! While the default template doesn't use When it comes to the navigation, it is powered by event handlers attached to autocomplete’s Let me know if you have any further question, you can get in touch with our support team as well: |
why not support it for result page? |
I have passed your feedback to the development team and we might implement it in the future if we get more requests for this. Search UI library was intended to give flexibility to build search interface as you like, so it doesn’t provide strict rules for user interaction. For example, building a search interface with grid view will have different keyboard-navigation use cases than a list view. If you are looking for a less flexible solution that supports keyboard navigation, I would recommend checking our ready-made SRP implementation: |
Just a small addition to my previous message. You can implement the navigation for results page as well by following these instructions. To make each result’s hit focusable (by default “SHIFT” key can focus on focusable elements), an attribute tabindex="0" could be usd. Then you would need to use eventListener to capture keyboard events and set page’s focus to the target result’s hit. Important note is that listeners should be attached to the containerId element, because the container element is not re-rendered on each keyword changed, so event listeners won’t be lost. Let me know if you have any follow-up question! |
The demo (for example, the basic example) doesn't seem to be able to use arrow keys to select the suggestions. They are
div
tags. On the other hand, the search suggestions, however, can. And they areli
tags. As I think it's a basic function, I wonder if this is intentional or not. And why not using theli
tags for search results as well? You can always usediv
inli
, right?In my case, I want to have a richer suggestions. That is, it looks like the search result, but they are just suggestions. Is that possible?
The text was updated successfully, but these errors were encountered: