Skip to content

fix: Combobox autofocus#9688

Open
Liknox wants to merge 3 commits intoadobe:mainfrom
Liknox:combobox-autofocus
Open

fix: Combobox autofocus#9688
Liknox wants to merge 3 commits intoadobe:mainfrom
Liknox:combobox-autofocus

Conversation

@Liknox
Copy link

@Liknox Liknox commented Feb 23, 2026

Closes #8007

This pull request initiates changes related to issue #8007. Users have expressed confusion when entering a query in the ComboBox and pressing Enter, leading to the suggestions menu closing—even with an exact match. To enhance usability, it's proposed that we auto-focus the first suggestion whenever the input text modifies.

Here are some points for discussion:

  • Should we introduce a disableAutoFocusFirst property, similar to Autocomplete, impacting the API?
  • What specific unit tests need to be developed?

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

I am utilizing the React Aria Components/ComboBox/Combo Box Example story found at (packages/react-aria-components/stories/ComboBox.stories.tsx). When the character 'F' is typed, the suggestion 'Foo' does not gain focus automatically. Also, upon typing 'Foo' and pressing enter, the window closes despite the first suggestion being an exact match."

@github-actions github-actions bot added the RAC label Feb 23, 2026
@LFDanLu
Copy link
Member

LFDanLu commented Feb 24, 2026

Thank you for your interest in this fix, I've commented here with some more context around why this was the behavior (i.e. screenreader announcements being interrupted when we added this behavior). We'll have to do this testing before moving forward with any possible API/code changes, but definitely feel free to try it out on your end in the meantime if you'd like.

@reidbarber reidbarber changed the title Combobox autofocus fix: Combobox autofocus Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComboBox: autofocus on first list item when ListBox is filtered (matching Autocomplete behaviour)

2 participants