Skip to content

fix(Selector, MultiSelector): an empty popup is a named group, not a listbox - #12087

Merged
cixzhang merged 13 commits into
mainfrom
lane4/selector-no-results-outside-listbox
Nov 27, 2026
Merged

cixzhang merged 13 commits into
mainfrom
lane4/selector-no-results-outside-listbox

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #13842. Thanks @FawwazLawal for the report and its axe repro.

Follow-up: #13861 (two optional wording notes from review, for a picker without search).

User impact

A screen-reader user who searches a Selector or MultiSelector and finds nothing, or opens one with no options, lands on an empty listbox: a list role with no options in it, which assistive technology treats as invalid (WCAG 1.3.1 and 4.1.2) and may announce as an empty list or skip. Now, while it holds no options, the popup is a group named by the field's label instead of a listbox. The "no results" or "no options" message is its content beside the search input, it is still announced, and the listbox (or a MultiSelector's grid) returns as soon as options match.

Problem and solution fit

  1. Why it occurs. The popup element always carried role="listbox" (or grid), and the empty message sat inside it marked role="presentation", so the listbox had no option children.
  2. Fix. While there are no options to show (not loading, nothing matches, no create row), the popup element is role="group", named by the same label relationship it carries as a listbox, without aria-multiselectable. The empty message is its content, beside the search input. The element itself stays, with its id, ref, keyboard handling and focus, so a popup that takes focus (a bottom sheet without search, or a MultiSelector with renderTrigger) lands on "Fruit, group, No options", the trigger's and search input's aria-controls still name an element in the document, and aria-expanded still tracks the open popup. Options bring the listbox role back; a MultiSelector grid returns as a grid and never becomes a listbox.

Expected behavior and authority

  • spec:AST-020 FR1 (WCAG 2.2 AA): an empty listbox or grid fails SC 1.3.1 Info and Relationships, which axe reports as aria-required-children. An empty grid fails the same way, so the empty popup is a named group in both modes.
  • spec:AST-086 FR11: the empty result is still announced through the existing live region, as before, including during page load.
  • A pre-existing gap stays out of scope: a MultiSelector with no search in a popover names its popup through the trigger, so it reads the trigger's value text ("Select...") instead of the label, for the listbox as well as the empty group. The record notes it under current-state impact, and a separate change follows.
  • Records amended for consistency with that repair, each keeping its rule's intent: spec:AST-058 FR2 and component:MultiSelector FR10 (with options the popup is the listbox or the grid and never switches between them as the filter changes; with no options it is a group named by the same label), spec:AST-058 FR7 and spec:AST-086 FR11 with its current-state note (the empty message is the popup's content and is also announced).
  • architecture:component-import-boundaries INV3: every ARIA reference names an element in the document.

Smallest restoration

  • packages/core/src/Selector/Selector.tsx and packages/core/src/MultiSelector/MultiSelector.tsx: the popup's role is group while the list is empty; the empty message drops role="presentation"; the emptySearchText JSDoc and source comments describe the message as content that is also announced.
  • docs/specs/components/Selector/Selector.spec.md AR6 and docs/specs/components/MultiSelector/MultiSelector.spec.md AR2 and FR10: an empty popup is a named group, with verification rows, and a current-state note on the popover popup's name; docs/specs/AST-058-option-actions/spec.md FR2, FR7, DEC-5 and its FR2/DEC-5 verification row; the MultiSelector FR2 gap sentence; docs/specs/AST-086-status-announcements/spec.md FR11 and its current-state note.
  • A [fix] changeset for @astryxdesign/core.

Evidence

  • Selector.test.tsx and MultiSelector.test.tsx "with no matching options, the popup is a named group, not a listbox, and the input still controls it": no listbox in the page, aria-expanded="true", aria-controls names a group named "Fruit" that holds the message; clearing the query brings the listbox back as that same element. Both fail on main and pass here.

  • Selector.test.tsx "with no options, focuses a group named by the label in the sheet" and MultiSelector.test.tsx "is a named group while a query matches nothing, and the grid again when it matches".

  • Empty-state tests that read the message inside the listbox now read it inside the popup the input controls.

  • The Selector, MultiSelector, ComplexSelector, PowerSearch, Tokenizer and Typeahead suites pass (51 files, 1,817 tests); tsc and eslint are clean.

  • Browser checks in Chromium and WebKit at this shape: axe reports aria-required-children (critical) on main for a Selector and a MultiSelector, each with a non-matching query and with no options, and for a MultiSelector grid with a non-matching query; the head reports none and no new rule. The accessibility tree shows a group holding the message ("Fruit", "Countries", "Labels") and no listbox or grid; the inputs' aria-controls name it. Clearing the query brings back the listbox, or the grid with its rows. In a bottom sheet without search and no options, focus lands on group "Fruit", "No options". The live region still announces "No results found" at zero results and the result count on refill.

  • iOS VoiceOver at this shape: opening, zero results ("No results found") and refill ("6 results", "3 results") read as on main, and the trigger still reads "List box pop up, Expanded". One known, accepted difference: in a bottom sheet without search and with no options, VoiceOver reads "Fruit, web dialog, No options, No options" (the message as the group's content, then its announcement), where main read "Fruit, No options, List start"; the cursor rests on "No options" in both.

  • Refreshed after the merge with main 3ce6c70 (head a2c1302; bcc5e15 then amended records and the changeset only). Chromium axe on the Selector and MultiSelector searchable stories with a non-matching query, light and dark: aria-required-children on main in 4 of 4 runs, none at this head in 4 of 4, and the search input's aria-controls names a group. EmptyStateAnnouncement.a11y.chromium.spec.ts now reads the empty popup as a group named "Fruit" whose content is the message, and finds no listbox and no live role on the message (2/2). The Selector and MultiSelector Chromium specs pass apart from that updated case (74/75 before the update). Picker suites 74 files, 1,964/1,964. Full core ui 990 files, 25,251/25,251. Selector and MultiSelector ×3 shuffled: the only failure is Selector.sheetLoadHover, which also fails on main, a known shuffle-order dependence in that test. check:repo passes, and so does check:changesets after the changeset's category tag became [fix].

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

R1 narration: none; the AR, FR2, FR7, FR10 and FR11 lines state behavior in the present tense.
R2 research: none.
R3 evidence: the verification rows name tests only.
R4 rejected alternatives: none added.
R5 change references: none.
R6 open questions: none.
R7 project status: none.

Testing

  • pnpm exec vitest run over the suites above (Selector, MultiSelector, ComplexSelector, PowerSearch, Tokenizer, Typeahead). tsc --noEmit for @astryxdesign/core: clean. pnpm check:knowledge: aligned.

Overlap checked: #10062, #11916, #12075, #11987, #11220, #6819, #13843 (#13843 holds back the highlight keys during a held sheet open; the others change Selector and MultiSelector touch behavior, how the bottom sheet loads, the touch sheet's search focus, field label and status text, the empty describedby and the default presentation; this change is only the popup's role while it holds no options)

This change touches Selector.tsx, which #10062's device evidence covers, so it lands after #10062.

Owner: fix-loop lane 4. Land path: Specs, CodeBunny, browser checks, CI, then the drain merges.

With no options to show, the popup kept role=listbox around a
presentational message, an invalid empty listbox. It now drops the
listbox role and its listbox-only attributes while it holds no options,
so the message sits as plain content beside the input. The same element
keeps its id, so aria-controls still names it, and the role returns as
soon as options match.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 27, 2026 6:01am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 27, 2026, 6:08 AM UTC

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 16, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d226fc6

Selector AR6 and MultiSelector AR1 state that, with no options, the popup
drops the listbox role and its listbox-only attributes and the empty
message sits beside the search input; each has a verification row.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 34f54ea

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d87828d

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
MultiSelector · Storybook 109.3 kB (+11 B) · 19.2 kB CSS (0) 2,864 (+3) ✓ · ✓ · ✓
Pagination 154.9 kB (+5 B) · 20.3 kB CSS (0) — — · — · —
SelectorOption 25.4 kB (0) · 6.8 kB CSS (0) — ✓ · ✓ · ✓
3 more components
Component Size LoC Visual · A11y · RTL
richtext/RichTextEditorToolbar 298.1 kB (−4 B) · 454 B CSS (0) — — · — · —
Selector 121.6 kB (−11 B) · 20.0 kB CSS (0) — ✓ · ✓ · ✓
PowerSearch 325.8 kB (−24 B) · 27.7 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 8.09 MB packed (−38 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the empty popup is no longer an empty listbox, but focus can now land on an element with no role or name, and several current records and docs still describe the old behavior.

  1. With no options, a Selector or MultiSelector bottom sheet without search, and a MultiSelector with renderTrigger, still move focus into the popup, which now has no role and no accessible name (Selector.tsx:2199, MultiSelector.tsx:2492); keep a role and the label name on the element that takes focus, or focus the sheet instead, and state that in AR6/AR1 with a test.
  2. The popup's role now follows the filtered view: a MultiSelector grid drops grid on a query that matches nothing while the trigger keeps aria-haspopup="grid", which spec:AST-058 FR2 and component:MultiSelector FR10 call a defect, so amend those claims and their verification rows here or keep the role.
  3. spec:AST-058 FR7 and spec:AST-086 (FR11 and its current-state impact) still say the empty message stays out of the accessibility tree and reaches assistive technology only through the announcement, so amend them here and decide whether the message should still announce during page load.
  4. The public emptySearchText JSDoc on both components (Selector.tsx:880-881, MultiSelector.tsx:903-904), and the matching source comments, still say the message is role="presentation" and the live region is its only route to assistive technology.
  5. The changeset says both components "no longer expose an empty listbox", but while isLoading with no options the popup is still an empty listbox, so start it with "When a search matches nothing, or there are no options".
  6. MultiSelector AR1's verification row sits in the behavioral contract table (MultiSelector.spec.md:144) instead of the Verification map.

Once the records are amended, an engineering owner re-approves them at the new head with /approve-spec <full head SHA>.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: neither component exposes an empty listbox any more. False as worded: the loading state still shows one (finding 5).
  • Claim: with no matching options, or no options, the popup drops the listbox role and listbox-only attributes. Verified by the new tests and in Chromium.
  • Claim: the message sits beside the search input. Partly true: a picker without search has no search input.
  • Claim: the message is still announced. Verified: the announcement call is unchanged and the announcement tests pass.
  • Claim: the search input still names the popup in aria-controls, and aria-expanded tracks it. Verified by the new tests and in Chromium.
  • Claim: the listbox returns as the same element when options match. Verified by the new tests.
  • Claim: the popup keeps its id, ref, keyboard handling and focus. Verified; that focus is finding 1.
  • Claim: the cause is a popup that was always a listbox around a presentational message. Verified on the base.
  • Claim: the new tests fail on the base and pass here. Verified with a red-first run.
  • Claim: the six suites pass (51 files, 1,817 tests). Verified.
  • Claim: TypeScript and ESLint are clean. Verified: @astryxdesign/core typecheck (source, tests and docs) and ESLint on the four changed source and test files both pass.
  • Claim: the cited records govern. The accessibility baseline adopts WCAG 1.3.1 and 4.1.2 without itself stating the listbox rule. The announcement record's text now contradicts the change (finding 3). ARIA references still name elements: verified.
  • Claim: no new public API, visual change or default. Verified: the API generator shows no changes, and before and after frames are identical.
  • Claim: public text has no internal context. Verified.
  • Claim: browser accessibility-tree and axe checks follow separately. Pending; not run here.
  • File .changeset/selector-empty-popup-not-a-listbox.md: finding 5.
  • File docs/specs/components/MultiSelector/MultiSelector.spec.md: findings 2 and 6.
  • File docs/specs/components/Selector/Selector.spec.md: finding 1 (AR6 leaves AR2's focus target undefined). Non-blocking: the AR6 verification row has no audit cell.
  • File packages/core/src/MultiSelector/MultiSelector.test.tsx: clear.
  • File packages/core/src/MultiSelector/MultiSelector.tsx: findings 1, 2 and 4.
  • File packages/core/src/Selector/Selector.test.tsx: clear.
  • File packages/core/src/Selector/Selector.tsx: findings 1 and 4.

Automated review (maintainer link)

Comment thread packages/core/src/Selector/Selector.tsx Resolved
…label

An empty popup with no role left focus on an unnamed element in a sheet
without search and with a caller's trigger, and let a MultiSelector grid
switch roles with the filter. While empty, the popup is now a group named
by the same label, holding the message. AST-058 FR2/FR7, MultiSelector
FR10/AR1, Selector AR6 and AST-086 FR11 state it; an empty listbox or grid
fails WCAG 2.2 SC 1.3.1. The emptySearchText JSDoc and comments, the
changeset and MultiSelector's verification map follow.
@cixzhang cixzhang changed the title fix(Selector, MultiSelector): an empty popup is not a listbox fix(Selector, MultiSelector): an empty popup is a named group, not a listbox Nov 16, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b90bc30

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
… a gap

A MultiSelector with no search in a popover names its popup through the
trigger, so it reads the trigger's value text instead of the label. AR1
keeps its wording; the gap is tracked separately.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f5d1052

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the empty popup is now a named group, and the earlier focus, docs, loading-wording and misfiled-row findings are fixed, but one always-run browser test, two record passages and the changeset still describe the old shape.

  • Miss: packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts runs on every pull request and still expects role="presentation" on the empty message (line 72), which this change removes, so rewrite it to assert the message inside the group the combobox controls and refresh its header and the SelectorEmptyStateA11y story's header.
  • spec:AST-058 DEC-5 and its FR2/DEC-5 verification row (line 274) still reject a popup role that follows the filtered view and a stale aria-haspopup, and component:MultiSelector FR2's gap sentence still says an empty field opens a listbox, so amend them for the empty group, including what aria-haspopup advertises while the group shows.
  • The changeset says the popup becomes a group named by the field's label, beside the search input, but a MultiSelector without search in a popover names it through its trigger and has no search input, so reword it to say the group is named as its listbox is.

Smaller non-blocking notes are inline: a missing audit cell on Selector's AR6 verification row, a "tracked separately" status phrase, and comments that mention an input that a picker without search does not have.

Claims and files checked

Review mode: full; reason: spec-record

Claims (changeset):

  • No empty listbox when a search matches nothing or there are no options: verified (new tests; Chromium accessibility checks on the Selector and MultiSelector stories).
  • The popup becomes a group named by the field's label: false for a MultiSelector without search in a popover, whose group is labelled by its trigger.
  • The message is the popup's content beside the search input: verified with search; a picker without search has no search input.
  • The message is still announced: verified (the announcement condition is unchanged; the announcement tests pass).
  • The search input still names the popup in aria-controls: verified (tests and Chromium).
  • The listbox or grid returns as soon as options match: verified (new tests).

Claims (description):

  • Cause: the popup was always a listbox or grid with a presentational message: verified on the base in Chromium.
  • Fix: a group without aria-multiselectable on the same element, keeping id, ref, keys and focus: verified (MultiSelector.tsx:2448-2454, Selector.tsx:2168, :2187).
  • A popup that takes focus lands on a group named by the label: verified for the Selector sheet by test, and for the MultiSelector sheet and caller-trigger paths by code; without search the message there is "No options".
  • aria-controls names an element and aria-expanded tracks the popup: verified.
  • A grid comes back as a grid and never as a listbox: verified (new test).
  • The empty result is still announced, including during page load: verified (condition unchanged).
  • The popover naming gap is pre-existing and recorded: verified (Chromium: labelled by the trigger on base and head).
  • The records were amended for consistency: partly false; DEC-5, its verification row and MultiSelector FR2's gap sentence were not.
  • Every ARIA reference names an element: verified.
  • The new tests fail on main and pass here: verified (four fail on the base, pass on the head).
  • The six suites pass and the typecheck is clean: verified (53 files, 1,983 tests across those suites plus Pagination and the announcer adopters; Core typecheck clean); eslint not run.
  • Chromium and WebKit axe results: not checked; the accessibility-tree shape was confirmed in Chromium.
  • iOS VoiceOver re-check pending: a statement, nothing to verify.
  • No new public API: verified (the API generator reports no added, changed or removed rows).
  • No project status in records: false for one line ("tracked separately"), non-blocking.
  • The knowledge check is aligned: verified.

Files:

  • .changeset/selector-empty-popup-not-a-listbox.md: finding (the group's name claim).
  • docs/specs/AST-058-option-actions/spec.md: finding (DEC-5 and its verification row left unamended).
  • docs/specs/AST-086-status-announcements/spec.md: clear.
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: finding (FR2 gap sentence); non-blocking status phrase.
  • docs/specs/components/Selector/Selector.spec.md: clear; non-blocking missing audit cell.
  • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear.
  • packages/core/src/MultiSelector/MultiSelector.tsx: clear; non-blocking comment wording.
  • packages/core/src/Selector/Selector.test.tsx: clear.
  • packages/core/src/Selector/Selector.tsx: clear; its role removal needs the always-run browser spec updated (first finding).

Automated review (maintainer link)

Comment thread packages/core/src/Selector/Selector.tsx Resolved
…ults-outside-listbox

# Conflicts:
#	docs/specs/components/MultiSelector/MultiSelector.spec.md
#	packages/core/src/MultiSelector/MultiSelector.tsx
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f909fdc

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one record fix. The amended records are owner-approved at this head, and the earlier blocking findings, including the description's quote for the focused empty group, are fixed.

Blocking:

  • Miss: MultiSelector.spec.md now has two AR1 requirements, "The listbox is named by the label" (line 196, from main) and this pull request's "An empty popup is a named group" (line 227), with two AR1 verification rows (lines 343 and 359), so FR10's "(AR1)" and every citation of the MultiSelector record's AR1 name two rules; give the empty-group requirement the next free ID (AR2) in its bullet, its verification row, FR10 and the description.

Renumbering changes the record, so an engineering owner approves the new head with /approve-spec <full head SHA> again; the author may do so as an engineering owner. CI has not run on this head yet, so the new tests and the always-run browser check still need a green run. The non-blocking wording notes are inline.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Changeset: no empty listbox when a search matches nothing or there are no options: verified (Selector.tsx:2209, :2228; MultiSelector.tsx:2517-2523); a loading popup keeps its listbox, which the changeset does not claim otherwise.
  • Changeset: the popup becomes a group named as its listbox is: verified (Selector.tsx:2210, :2233; MultiSelector.tsx:2512-2533).
  • Changeset: the message is the group's content: verified (Selector.tsx:2041-2050; MultiSelector.tsx:2389-2398).
  • Changeset: the message is still announced: verified (Selector.tsx:1566-1568; MultiSelector.tsx:1703-1710).
  • Changeset: the combobox still names the popup in aria-controls: verified (Selector.tsx:1911, :2441; MultiSelector.tsx:2103, :2724, :2841; the element keeps its id in both roles).
  • Changeset: the listbox or grid returns once options match: verified (the role is computed each render; the grid latch is unchanged).
  • Description: the popup was always a listbox or grid holding a presentational message: verified on the base.
  • Description: the same element becomes a group without aria-multiselectable and keeps its id, ref, keys and focus: verified.
  • Description: a focused empty popup reads "Fruit, group, No options": verified (Selector.tsx:2031, :2049; MultiSelector.tsx:2396; Selector.test.tsx:350-372).
  • Description: aria-controls still names an element and aria-expanded tracks the popup: verified.
  • Description: a grid returns as a grid, never a listbox: verified (MultiSelector.tsx:2517-2523).
  • Description: the empty result is still announced, including during page load: verified by code and the amended announcement record.
  • Description: a popover MultiSelector without search is named by its trigger, left for a later change: verified (MultiSelector.tsx:2512-2514; current-state note).
  • Description: the message sits beside the search input: partly; a picker without search has no input (non-blocking).
  • Description: the listed records, comments, docs and a [fix] changeset are amended or added: verified in the diff.
  • Description: the MultiSelector record's AR1 is the empty-group rule: ambiguous; that record has two AR1 rules (blocking finding).
  • Description: the new and retargeted tests exist with the stated names and assertions, and fail on the base: verified by reading.
  • Description: the refreshed evidence followed the merge with main, and later commits touch only records, the changeset and comments: verified (source changes since are comment-only).
  • Description: suites, typecheck, lint, repository checks and shuffled runs pass: not reproduced (CI has not run on this head).
  • Description: Chromium, WebKit and VoiceOver results: the author's statements, not reproduced.
  • Description: no new public API, visual change, default or interaction model: verified.
  • Description: writing rubric results, including no project status: verified.
  • Description: the repository's knowledge check is aligned: not reproduced; that check does not compare requirement IDs.
  • Description: the change lands after another open pull request that covers Selector device evidence: a landing-order statement, not checked.

Files:

  • .changeset/selector-empty-popup-not-a-listbox.md: clear.
  • apps/storybook/stories/SelectorEmptyStateA11y.stories.tsx: clear.
  • docs/specs/AST-058-option-actions/spec.md: clear; non-blocking (concept row and AR4 wording).
  • docs/specs/AST-086-status-announcements/spec.md: clear.
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: blocking (duplicate AR1); non-blocking (empty-group AR1 and FR8 wording).
  • docs/specs/components/Selector/Selector.spec.md: non-blocking (AR6 wording, popup semantics row).
  • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear.
  • packages/core/src/MultiSelector/MultiSelector.tsx: non-blocking (empty-state comment).
  • packages/core/src/Selector/Selector.test.tsx: clear.
  • packages/core/src/Selector/Selector.tsx: clear.
  • packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

…2; the empty-state comment says how the group is named
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 27, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0f65dd0

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one record fix. The amended records are owner-approved at this head, and the earlier blocking findings, including the duplicate MultiSelector AR1, are fixed.

Blocking:

  • Miss: in docs/specs/AST-086-status-announcements/spec.md, the FR11/FR12 verification row (line 362) still exempts "an announcement-only message", a term the amended FR11 and FR12 no longer define, so read as written it fails the empty panel's page-load announcement that FR11 requires; change the parenthesis to "(other than a picker's empty-panel message, FR11)".

The fix edits a record, so an engineering owner approves the new head with /approve-spec <full head SHA> again; the author may do so as an engineering owner. CI has not run tests on this head yet, so the new tests and the always-run browser check still need a green run.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Changeset: no empty listbox when a search matches nothing or there are no options: verified (Selector.tsx:2209, :2228; MultiSelector.tsx:2517-2523); a loading popup keeps its listbox, which the changeset does not claim otherwise.
  • Changeset: the popup becomes a group named as its listbox is: verified (Selector.tsx:2210, :2233; MultiSelector.tsx:2512-2533).
  • Changeset: the message is the group's content: verified (Selector.tsx:2041-2050; MultiSelector.tsx:2389-2398).
  • Changeset: the message is still announced: verified (Selector.tsx:1566-1568; MultiSelector.tsx:1703-1710).
  • Changeset: the combobox still names the popup in aria-controls: verified (Selector.tsx:1911, :2441; MultiSelector.tsx:2103, :2841; the element keeps its id in both roles).
  • Changeset: the listbox or grid returns once options match: verified (the role is computed each render; the grid latch is unchanged).
  • Description: the popup was always a listbox or grid holding a presentational message: verified on the base.
  • Description: the same element becomes a group without aria-multiselectable and keeps its id, ref, keys and focus: verified.
  • Description: a focused empty popup in a sheet without search, or with a caller's trigger, reads as group "Fruit" holding "No options": verified by code (Selector.tsx:2228-2233, :2049; MultiSelector.tsx:2529-2557; Selector.test.tsx:350-372).
  • Description: aria-controls still names an element and aria-expanded tracks the popup: verified.
  • Description: a grid returns as a grid, never a listbox: verified (MultiSelector.tsx:2517-2523).
  • Description: the empty result is still announced, including during page load: verified by code; the record's verification row for that rule is stale (blocking finding).
  • Description: a popover MultiSelector without search is named by its trigger, left for a later change: verified (MultiSelector.tsx:2512-2514; current-state note).
  • Description: the message sits beside the search input: partly; a picker without search has no input (non-blocking).
  • Description: the listed records, comments, docs and a [fix] patch changeset are amended or added, with the MultiSelector rule as AR2: verified in the diff.
  • Description: the new and retargeted tests exist with the stated names and assertions, and fail on the base: verified by reading.
  • Description: later commits after the evidence refresh touch only records, the changeset and comments: verified (source changes since are comment-only).
  • Description: suites, typecheck, lint, repository checks and shuffled runs pass: not reproduced (no test ran on this head).
  • Description: Chromium, WebKit and VoiceOver results: the author's statements, not reproduced.
  • Description: no new public API, visual change, default or interaction model: verified.
  • Description: writing rubric results, including no project status: verified.
  • Description: the landing order after another open pull request: a statement, not checked.

Files:

  • .changeset/selector-empty-popup-not-a-listbox.md: clear.
  • apps/storybook/stories/SelectorEmptyStateA11y.stories.tsx: clear.
  • docs/specs/AST-058-option-actions/spec.md: clear; non-blocking (review projection, concept row and AR4 wording).
  • docs/specs/AST-086-status-announcements/spec.md: blocking (stale verification-row term).
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; non-blocking (AR2 and FR8 wording).
  • docs/specs/components/Selector/Selector.spec.md: non-blocking (AR6 wording, popup semantics row).
  • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear.
  • packages/core/src/MultiSelector/MultiSelector.tsx: clear.
  • packages/core/src/Selector/Selector.test.tsx: clear.
  • packages/core/src/Selector/Selector.tsx: clear.
  • packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

…pty-panel message, not an announcement-only one
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 944074d

@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed needs:spec-owner-review Current knowledge records await owner approval labels Nov 27, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI started on this head when the pull request was marked ready for review, and its remaining jobs have to pass before merge.

The amended Selector, MultiSelector, option-action and status-announcement records are owner-approved at this head, and no blocking finding remains. The optional wording follow-ups (the shared announcement hook's header comment, and "beside the search input" or "named by the field's label" for a picker without search) are tracked in #13861. Two smaller optional notes: a few listbox-only sentences in the records sit beside the new empty-group exception, and no test covers the empty group in a MultiSelector bottom sheet without search or with a custom trigger.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • Changeset: no empty listbox when a search matches nothing or there are no options: verified (Selector.tsx:2209, :2228; MultiSelector.tsx:2517-2522); a loading popup keeps its listbox, which the changeset does not claim otherwise.
  • Changeset: the popup becomes a group named as its listbox is: verified (Selector.tsx:2210, :2233; MultiSelector.tsx:2512-2533).
  • Changeset: the message is the group's content: verified (Selector.tsx:2042-2050; MultiSelector.tsx:2389-2397).
  • Changeset: the message is still announced: verified (Selector.tsx:1566-1568; MultiSelector.tsx:1703-1710).
  • Changeset: the combobox still names the popup in aria-controls: verified (Selector.tsx:1911, :2441; MultiSelector.tsx:2103, :2841; the element keeps its id in both roles).
  • Changeset: the listbox or grid returns once options match: verified (the role is computed each render; the grid latch is unchanged).
  • Description: it fixes the reported axe failure on the empty listbox: verified by code; while not loading, the popup is never an empty listbox or grid.
  • Description: a follow-up issue holds two optional wording notes for a picker without search: verified; it covers this review's hook-comment and wording notes.
  • Description: on the base the popup was always a listbox or grid holding a presentational message: verified.
  • Description: with no options the popup is a group named by the field's label: partly; a popover MultiSelector without search names it through the trigger, as the description's own gap bullet says (non-blocking).
  • Description: the same element becomes a group without aria-multiselectable and keeps its id, ref, keys and focus: verified.
  • Description: the message sits beside the search input: partly; a picker without search has no input (non-blocking, in the follow-up issue).
  • Description: a focused empty popup in a sheet without search, or with a caller's trigger, reads as a group "Fruit" holding "No options": verified by code (Selector.tsx:2225-2239, :2049; MultiSelector.tsx:2529-2558; Selector.test.tsx:350).
  • Description: aria-controls still names an element and aria-expanded tracks the open popup: verified.
  • Description: a grid returns as a grid, never a listbox: verified (MultiSelector.tsx:2517-2522).
  • Description: the empty result is still announced through the live region, including during page load: verified by code; the record's verification row matches.
  • Description: the accessibility baseline and the ARIA-reference rule it cites say what it quotes: verified.
  • Description: a popover MultiSelector without search names its popup through the trigger, left for a later change: verified (MultiSelector.tsx:2512-2514; current-state note).
  • Description: the listed records, comments, docs and a [fix] patch changeset are amended or added: verified; the list omits the FR12 clause and two verification rows it also edits (non-blocking).
  • Description: the new and retargeted tests exist with the stated names and assertions, and fail on the base: verified by reading.
  • Description: the empty-state browser spec reads the empty popup as a group named "Fruit" holding the message, with no listbox and no live role on the message: verified; CI's accessibility run passes it on this head.
  • Description: the commit after the evidence refresh changed only records and the changeset: verified; later source changes are comment-only.
  • Description: suites, typecheck, lint, repository and changeset checks, and shuffled runs pass: typecheck, lint, every node test shard, the Selector suite and the accessibility and visual jobs pass in CI on this head; the remaining UI test shards and the shuffled runs are not reproduced here.
  • Description: Chromium, WebKit and VoiceOver results: the author's statements, not reproduced.
  • Description: no new public API, visual change, default or interaction model: verified (CI's API report lists no change, and its visual regression no changed frame).
  • Description: writing rubric results, including no project status: verified.
  • Description: it lands after the earlier Selector pull request it names: verified; that pull request is merged.
  • Description: overlap with other open Selector and MultiSelector pull requests was checked: the author's statement, not checked.
  • Description: public text and artifacts contain no internal context: verified.

Files:

  • .changeset/selector-empty-popup-not-a-listbox.md: clear.
  • apps/storybook/stories/SelectorEmptyStateA11y.stories.tsx: clear.
  • docs/specs/AST-058-option-actions/spec.md: clear; non-blocking (review checks, concept row and AR4 wording).
  • docs/specs/AST-086-status-announcements/spec.md: clear; non-blocking (current-state note says "named by the field's label").
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; non-blocking (AR2 and FR8 wording).
  • docs/specs/components/Selector/Selector.spec.md: clear; non-blocking (AR6 wording, popup semantics row).
  • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear; non-blocking (no sheet or caller-trigger empty-group test).
  • packages/core/src/MultiSelector/MultiSelector.tsx: clear.
  • packages/core/src/Selector/Selector.test.tsx: clear.
  • packages/core/src/Selector/Selector.tsx: clear.
  • packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d87828d

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet because the pull request is a draft. It starts when the pull request is marked ready for review, and its jobs have to pass before merge.

The amended Selector, MultiSelector, option-action and status-announcement records are owner-approved at this head, the newest commit is a clean merge of main that leaves this pull request's own changes untouched, and no blocking finding remains. The optional wording follow-ups (the shared announcement hook's header comment, and "beside the search input" or "named by the field's label" for a picker without search) are tracked in #13861. Two smaller optional notes: a few listbox-only sentences in the records sit beside the new empty-group exception, and no test covers the empty group in a MultiSelector bottom sheet without search or with a custom trigger.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Changeset: no empty listbox when a search matches nothing or there are no options: verified (Selector.tsx:2209, :2228; MultiSelector.tsx:2517-2522); a loading popup keeps its listbox, which the changeset does not claim otherwise.
  • Changeset: the popup becomes a group named as its listbox is: verified (Selector.tsx:2210, :2233; MultiSelector.tsx:2512-2533).
  • Changeset: the message is the group's content: verified (Selector.tsx:2042-2050; MultiSelector.tsx:2389-2397).
  • Changeset: the message is still announced: verified (Selector.tsx:1566-1568; MultiSelector.tsx:1703-1710).
  • Changeset: the combobox still names the popup in aria-controls: verified (Selector.tsx:1911, :2441; MultiSelector.tsx:2103, :2841; the element keeps its id in both roles).
  • Changeset: the listbox or grid returns once options match: verified (the role is computed each render; the grid latch is unchanged).
  • Description: it fixes the reported axe failure on the empty listbox: verified by code; while not loading, the popup is never an empty listbox or grid.
  • Description: a follow-up issue holds two optional wording notes for a picker without search: verified.
  • Description: on the base the popup was always a listbox or grid holding a presentational message: verified.
  • Description: with no options the popup is a group named by the field's label: partly; a popover MultiSelector without search names it through the trigger, as the description's own gap bullet says (non-blocking).
  • Description: the same element becomes a group without aria-multiselectable and keeps its id, ref, keys and focus: verified.
  • Description: the message sits beside the search input: partly; a picker without search has no input (non-blocking, in the follow-up issue).
  • Description: a focused empty popup in a sheet without search, or with a caller's trigger, reads as a group "Fruit" holding "No options": verified by code (Selector.tsx:2225-2239, :2049; MultiSelector.tsx:2529-2558; Selector.test.tsx:350).
  • Description: aria-controls still names an element and aria-expanded tracks the open popup: verified.
  • Description: a grid returns as a grid, never a listbox: verified (MultiSelector.tsx:2517-2522).
  • Description: the empty result is still announced through the live region, including during page load: verified by code; the record's verification row matches.
  • Description: the accessibility baseline and the ARIA-reference rule it cites say what it quotes: verified.
  • Description: a popover MultiSelector without search names its popup through the trigger, left for a later change: verified (MultiSelector.tsx:2512-2514; current-state note).
  • Description: the listed records, comments, docs and a [fix] patch changeset are amended or added: verified; the list omits the FR12 clause and two verification rows it also edits (non-blocking).
  • Description: the new and retargeted tests exist with the stated names and assertions, and fail on the base: verified by reading.
  • Description: the empty-state browser spec reads the empty popup as a group named "Fruit" holding the message, with no listbox and no live role on the message: verified by reading; CI passed it on the previous revision, which had the same changes, and has not run on this head.
  • Description: the commits after the evidence refresh changed only records, the changeset and comments, then merged main: verified; the latest merge touches none of this pull request's files.
  • Description: suites, typecheck, lint, repository and changeset checks, and shuffled runs pass: typecheck, lint, the node test shards, the Selector suite and the accessibility and visual jobs passed in CI on the previous revision with the same changes; not re-run on this head (CI skipped while draft), and the shuffled runs are not reproduced.
  • Description: Chromium, WebKit and VoiceOver results: the author's statements, not reproduced.
  • Description: no new public API, visual change, default or interaction model: verified from the source (no export, prop, default, data attribute or theme target changes).
  • Description: writing rubric results, including no project status: verified.
  • Description: it lands after the earlier Selector pull request it names: verified; that pull request is merged.
  • Description: overlap with other open Selector and MultiSelector pull requests was checked: the author's statement, not checked; the one merged since only holds back highlight keys while a sheet loads and does not touch the popup's role.
  • Description: public text and artifacts contain no internal context: verified.

Files:

  • .changeset/selector-empty-popup-not-a-listbox.md: clear.
  • apps/storybook/stories/SelectorEmptyStateA11y.stories.tsx: clear.
  • docs/specs/AST-058-option-actions/spec.md: clear; non-blocking (review checks, concept row and AR4 wording).
  • docs/specs/AST-086-status-announcements/spec.md: clear; non-blocking (current-state note says "named by the field's label").
  • docs/specs/components/MultiSelector/MultiSelector.spec.md: clear; non-blocking (AR2 and FR8 wording).
  • docs/specs/components/Selector/Selector.spec.md: clear; non-blocking (AR6 wording, popup semantics row).
  • packages/core/src/MultiSelector/MultiSelector.test.tsx: clear; non-blocking (no sheet or caller-trigger empty-group test).
  • packages/core/src/MultiSelector/MultiSelector.tsx: clear.
  • packages/core/src/Selector/Selector.test.tsx: clear.
  • packages/core/src/Selector/Selector.tsx: clear.
  • packages/core/src/Selector/__tests__/EmptyStateAnnouncement.a11y.chromium.spec.ts: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 27, 2026 06:20
@cixzhang
cixzhang merged commit 033e53f into main Nov 27, 2026
212 of 215 checks passed

This branch was successfully deployed

1 active deployment
Preview — d87828d0 Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selector / MultiSelector: empty-search message inside role="listbox" fails axe aria-required-children (critical)

1 participant