[combobox][docs] Add screen reader hints to the multiple-select demos - #5628
Merged
Merged
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,010.80 ms -213.35 ms(-17.4%) | Renders: 76 (+0) | Paint: 1,640.77 ms -350.77 ms(-17.6%)
…and 3 more (+7 within noise) — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atomiks
marked this pull request as ready for review
September 3, 2026 12:01
atomiks
requested review from
aarongarciah,
colmtuite,
flaviendelangle and
michaldudak
as code owners
September 3, 2026 12:01
silviuaavram
approved these changes
Sep 3, 2026
| {(value: DirectoryUser[]) => ( | ||
| <Combobox.Chips | ||
| className={styles.Chips} | ||
| aria-label={value.length > 0 ? 'Selected reviewers' : undefined} |
Member
There was a problem hiding this comment.
Might not need to add this conditionally. It's just a container that might not have items.
Contributor
Author
There was a problem hiding this comment.
role="toolbar" is applied conditionally, so it can only have a label with a value added
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.
In
multiplemode, screen reader users get no hint that selected chips exist, that Left Arrow from the input reaches them, or that Backspace/Delete removes a focused chip. The chips have no role, so nothing is announced beyond the chip text and the nested remove button.This adds
aria-descriptionin themultipleandasync-multipledemos (CSS Modules and Tailwind): "Press Backspace or Delete to remove" on each<Combobox.Chip>, and "Press Left Arrow to edit the selected items" on<Combobox.Input>while the value is non-empty. A short note under the demo says these are app strings to translate.The library ships no user-facing text, so the hints live in the demos only.
aria-descriptionis used overaria-describedbybecause Safari 17+ is the support floor. String-free library improvements (a role onCombobox.Chip,aria-keyshortcuts, Enter on a focused chip) are left for a separate issue.