[menu][select][combobox][scroll area] Hide group labels and scrollbars from the accessibility tree - #5598
Merged
atomiks merged 3 commits intoAug 31, 2026
Conversation
azeng4499
requested review from
atomiks,
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
August 29, 2026 20:45
commit: |
Bundle size
PerformanceTotal duration: 1,029.90 ms -35.75 ms(-3.4%) | Renders: 76 (+0) | Paint: 1,651.25 ms -76.30 ms(-4.4%) No significant changes — 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. |
…l area corner from the accessibility tree
…rom-accessibility-tree
atomiks
approved these changes
Aug 31, 2026
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.
Menu.GroupLabelandScrollArea.Scrollbarare exposed in the accessibility tree, which causes problems for the screen reader:ScrollArea.Scrollbaris counted as an additional item in the surrounding container, suggesting there's more content to explore, even though the scrollbar can't be reached.Menu.GroupLabelis announced as a separate stop even though its text is already announced when focus enters the associated group (via thearia-labelledbyrelationship), so the same text is heard twice.The same applies to the group labels in Select and Combobox, and to
ScrollArea.Corner.Changes
Add
aria-hidden="true"by default to:Menu.GroupLabelSelect.GroupLabelCombobox.GroupLabel(also exported asAutocomplete.GroupLabel)ScrollArea.ScrollbarScrollArea.CornerGroup labels stay the source of the group's accessible name or description via
aria-labelledby/aria-describedby. Hidden text still contributes to a name or description when referenced this way, so the label can be removed as a standalone node without losing the group's name. Scrollbars and the corner remain visually and pointer operable.Menu.GroupLabelalso dropsrole="presentation". ARIA's presentational roles conflict resolution makes user agents ignore that role once the element carries a global ARIA attribute, andaria-hiddenis global, so the role no longer had an effect.Select.GroupLabelandCombobox.GroupLabelnever set it, so the three parts now match.The defaults are applied before user props are spread, so users can still override
aria-hidden.None of these elements are focusable or contain focusable content, so the browser does not warn about
aria-hidden.Closes #5585