fix(web): Enter activates highlighted search row#433
Merged
intendednull merged 1 commit intoApr 27, 2026
Merged
Conversation
Search a11y land active_index + aria-activedescendant in #344, but Enter still route to recents-push. Wire Enter on input keydown to invoke on_select for row at active_index in flat in-display order. No active row (zero results) fall through to existing recents-push path so empty-hit queries still get remembered. Browser test seed three rows, set active_index=1, dispatch Enter, assert on_select fire with m-1 not on_submit. Second test pin zero-results fallback. Refs #406
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Search a11y land
active_index+aria-activedescendantin #344. Enter still route to "push to recents" not activate highlighted row. ArrowDown move highlight, Enter ignore it.Fix
Wire Enter in
input.rskeydown to invokeon_selectfor row atactive_indexin flat in-display order. No row (zero results) → fall through existingon_submitrecents-push path so empty-hit queries still remembered.SearchInputget newon_select: Callback<SearchResult>prop.surface.rspasson_select_result(same callback row click use).Test
Browser test (
crates/web/tests/browser.rs):on_selectfire withm-1exact,on_submitnot fire.on_selectsilent,on_submitget raw query.TDD red-green: prop missing → compile fail (RED), add prop + wire → tests pass (GREEN).
Refs #406
Generated by Claude Code