[WC-3418] Combobox accessibility improvements#2281
Open
HedwigAR wants to merge 12 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HedwigAR
force-pushed
the
feature/combobox-validation-improvements
branch
from
July 6, 2026 13:40
0d5657e to
d1fded1
Compare
This comment has been minimized.
This comment has been minimized.
r0b1n
reviewed
Jul 8, 2026
Comment on lines
+144
to
+153
| aria-label={ | ||
| !isOpen && selectedItems.length > 0 && hasLabel | ||
| ? `${labelText}, ${selectedItems.map(id => selector.caption.get(id)).join(", ")}` | ||
| : !isOpen && selectedItems.length > 0 | ||
| ? selectedItems.map(id => selector.caption.get(id)).join(", ") | ||
| : !hasLabel | ||
| ? options.ariaLabel | ||
| : undefined | ||
| } | ||
| aria-labelledby={hasLabel && isOpen ? inputProps["aria-labelledby"] : undefined} |
Collaborator
There was a problem hiding this comment.
I believe we better create a helper function that covers this, also as AI review mentioned, there is a logic error where in empty it will have no label at all, we should address this in a helper function that we can unit test.
iobuhov
reviewed
Jul 14, 2026
|
|
||
| await waitFor(() => { | ||
| const spinner = component.container.querySelector(".widget-combobox-spinner"); | ||
| if (spinner) { |
Collaborator
There was a problem hiding this comment.
@leonardomendix, can we avoid this if? How do you think?
iobuhov
reviewed
Jul 14, 2026
| placeholder=" " | ||
| aria-labelledby={hasLabel ? inputProps["aria-labelledby"] : undefined} | ||
| aria-label={ | ||
| !isOpen && selectedItem && hasLabel |
Collaborator
There was a problem hiding this comment.
Also case for helper function
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HedwigAR
force-pushed
the
feature/combobox-validation-improvements
branch
from
July 16, 2026 13:32
a14d634 to
093bcff
Compare
This comment has been minimized.
This comment has been minimized.
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.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
Fixes two WCAG accessibility violations in the combobox widget.
aria-hidden="true"to DownArrow and ClearButton icon wrappers to prevent "image" announcements<ul>now only renders when open, preventing screen readers from navigating to empty groupsWhat should be covered while testing?
Screen Reader Testing:
Functional Testing: