fix(selector): render in-listbox dividers as presentation, not separator (#4994) - #5344
Open
gonzoblasco wants to merge 1 commit into
Open
fix(selector): render in-listbox dividers as presentation, not separator (#4994)#5344gonzoblasco wants to merge 1 commit into
gonzoblasco wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Fixes #4994 -
SelectorandMultiSelectorplaced arole="separator"divider inside theirrole="listbox"popup. Alistboxonly permitsoption/groupchildren, so a separator among them was a critical axe violation (aria-required-children, WCAG 1.3.1/4.1.2) that could drop or mis-report the listbox children in a screen reader.Changes
Dividernow accepts an explicitroleprop (default'separator'), so consumers can override it for placement inside a restricted-role container.Selectorrenders its in-listbox option dividers asrole="presentation", keeping the visual rule out of the accessibility tree.MultiSelectordoes the same for its in-listbox option dividers.The standalone divider between the search row and the listbox keeps its
role="separator"— it is a legitimate separator between two sections, not a child of the listbox.Validation
SelectorandMultiSelectorassert the in-listbox divider rendersrole="presentation".role="separator"still pass (that divider is outside the listbox).Fixes #4994