[combobox] Document and improve input click + list options filtering#3449
Open
silviuaavram wants to merge 1 commit into
Open
[combobox] Document and improve input click + list options filtering#3449silviuaavram wants to merge 1 commit into
silviuaavram wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the combobox autocomplete examples to refine open/close behavior on pointer interaction and adjust filtering behavior to avoid filtering when the input is empty or already matches an available option.
Changes:
- Updated
ComboboxAutocompleteclick handling so repeated textbox clicks don’t toggle the popup closed. - Updated filtering logic so empty input (and exact-match input) shows the full option list.
- Added/updated automated tests and documentation tables describing new pointer/keyboard behaviors; refreshed coverage-report artifacts.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tests/combobox_autocomplete-none.js | Adds tests for textbox click/focus pointer interaction behavior. |
| test/tests/combobox_autocomplete-list.js | Adds pointer interaction tests and new filtering-behavior test cases. |
| test/tests/combobox_autocomplete-both.js | Adds pointer interaction tests and new filtering-behavior test cases. |
| content/patterns/combobox/examples/js/combobox-autocomplete.js | Adjusts click-to-open behavior and expands “no filtering” conditions. |
| content/patterns/combobox/examples/combobox-autocomplete-none.html | Documents pointer interaction semantics for textbox/button. |
| content/patterns/combobox/examples/combobox-autocomplete-list.html | Documents pointer interaction + adds keyboard doc row for filtering behavior. |
| content/patterns/combobox/examples/combobox-autocomplete-both.html | Documents pointer interaction + adds keyboard doc row for filtering behavior. |
| content/patterns/combobox/combobox-pattern.html | Updates pattern-level narrative re: filtering and popup opening interactions. |
| content/about/coverage-and-quality/role-coverage.csv | Updates generated counts/entries for role coverage. |
| content/about/coverage-and-quality/coverage-and-quality-report.html | Updates generated role report list (adds a new “note” link). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+196
to
+202
| if ( | ||
| this.isNone || | ||
| this.filter.trim() === '' || | ||
| this.allOptions.some( | ||
| (opt) => this.getLowercaseContent(opt) === this.filter.toLowerCase() | ||
| ) | ||
| ) { |
Comment on lines
+53
to
55
| <li>It is displayed when the user clicks the combobox input. Clicking the input only opens the popup and does not toggle it closed.</li> | ||
| <li>If a chevron or toggle button is present adjacent to the combobox, activating it toggles the popup open or closed.</li> | ||
| <li>If the combobox is editable, the popup is displayed only if a certain number of characters are typed in the combobox and those characters match some portion of one of the suggested values.</li> |
| optionsSelector: '#ex1 [role="option"]', | ||
| buttonSelector: '#ex1 button', | ||
| numAOptions: 5, | ||
| numOptions: 56, |
| optionsSelector: '#ex1 [role="option"]', | ||
| buttonSelector: '#ex1 button', | ||
| numAOptions: 5, | ||
| numOptions: 56, |
Comment on lines
+199
to
+201
| this.allOptions.some( | ||
| (opt) => this.getLowercaseContent(opt) === this.filter.toLowerCase() | ||
| ) |
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.
Closes #3442.
Implements what we discussed in this comment.
Improve combobox click, focus, and filter guidance
Changes
Behavior (
combobox-autocomplete.js)Pattern documentation (
combobox-pattern.html)Example pages (
combobox-autocomplete-{both,list,none}.html)textbox-filterrow to the keyboard table (list/both examples) documenting filter and show-all conditions.Regression tests (
combobox_autocomplete-{both,list,none}.js)textbox-click: clicking the input opens the popup and a second click does not close it.textbox-focus: focusing the input without clicking does not open the popup.textbox-filter(list/both): verifies all options shown for empty input, exact match, case-insensitive exact match, and whitespace-only input; verifies filtered count (2) for partial string"al".WAI Preview Link (Last built on Mon, 15 Jun 2026 08:51:49 GMT).