feat(react-search): add SearchBox typeahead/autocomplete Storybook story and design spec#35875
Merged
ValentinaKozlova merged 6 commits intomasterfrom Mar 27, 2026
Merged
Conversation
…HBOX-SPEC.md Co-authored-by: ValentinaKozlova <11574680+ValentinaKozlova@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Feature]: Add typeahead functionality to SearchBox
feat(react-search): add SearchBox typeahead/autocomplete Storybook story and design spec
Mar 17, 2026
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
packages/react-components/react-search/library/docs/TYPEAHEAD-SEARCHBOX-SPEC.md
Show resolved
Hide resolved
smhigley
requested changes
Mar 18, 2026
Contributor
smhigley
left a comment
There was a problem hiding this comment.
Thanks so much for making this PR! Overall the semantics look good, just a few notes around handling specific screen reader behaviors (screen readers are weird and especially so with comboboxes 😅)
packages/react-components/react-search/stories/src/SearchBox/SearchBoxTypeahead.stories.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-search/stories/src/SearchBox/SearchBoxTypeahead.stories.tsx
Show resolved
Hide resolved
packages/react-components/react-search/stories/src/SearchBox/SearchBoxTypeahead.stories.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-search/stories/src/SearchBox/SearchBoxTypeahead.stories.tsx
Outdated
Show resolved
Hide resolved
ValentinaKozlova
approved these changes
Mar 24, 2026
smhigley
reviewed
Mar 26, 2026
packages/react-components/react-search/library/docs/TYPEAHEAD-SEARCHBOX-SPEC.md
Outdated
Show resolved
Hide resolved
smhigley
reviewed
Mar 26, 2026
packages/react-components/react-search/stories/src/SearchBox/SearchBoxBestPractices.md
Outdated
Show resolved
Hide resolved
smhigley
approved these changes
Mar 26, 2026
Contributor
smhigley
left a comment
There was a problem hiding this comment.
Minor comment on updating the markdown files to remove therole=combobox there as well, but approving so it's ready to merge after that!
The example itself looks good, and is working well for me 💜
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.
The
SearchBoxcomponent lacked any typeahead (autocomplete) guidance or implementation, leaving users without a clear path to building search-with-results patterns recommended by the Fluent 2 design docs.Changes
New:
TYPEAHEAD-SEARCHBOX-SPEC.mdAdded the design spec (referenced in the issue) documenting the proposed API surface, component states, interaction model, and accessibility requirements for a typeahead SearchBox pattern.
New:
SearchBoxTypeahead.stories.tsxComplete Storybook story demonstrating the composable typeahead pattern using existing primitives:
Covers:
Spinnerinside the dropdownArrowDown/ArrowUp,Enterto select,Escapeto dismissrole="combobox",aria-activedescendant,aria-liveregion for result count announcementsvisuallyHiddenclass instead of inline stylesUpdated:
SearchBoxBestPractices.md+index.stories.tsxAdded a best-practice recommendation pointing to the typeahead story, and exported the new story from the component's story index.
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.