Skip to content

fix(selector): render in-listbox dividers as presentation, not separator (#4994) - #5344

Open
gonzoblasco wants to merge 1 commit into
facebook:mainfrom
gonzoblasco:fix/selector-listbox-divider-role
Open

fix(selector): render in-listbox dividers as presentation, not separator (#4994)#5344
gonzoblasco wants to merge 1 commit into
facebook:mainfrom
gonzoblasco:fix/selector-listbox-divider-role

Conversation

@gonzoblasco

@gonzoblasco gonzoblasco commented Aug 22, 2026

Copy link
Copy Markdown

What

Fixes #4994 - Selector and MultiSelector placed a role="separator" divider inside their role="listbox" popup. A listbox only permits option/group children, 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

  • Divider now accepts an explicit role prop (default 'separator'), so consumers can override it for placement inside a restricted-role container.
  • Selector renders its in-listbox option dividers as role="presentation", keeping the visual rule out of the accessibility tree.
  • MultiSelector does 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

  • New tests in both Selector and MultiSelector assert the in-listbox divider renders role="presentation".
  • Existing tests that assert the search-row divider stays role="separator" still pass (that divider is outside the listbox).

Fixes #4994

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Error Error Aug 22, 2026 8:31pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 22, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selector and MultiSelector put a role=separator Divider inside role=listbox (critical axe violation)

1 participant