Skip to content

[combobox][autocomplete] Allow opening and browsing the popup while readOnly - #5541

Merged
atomiks merged 5 commits into
mui:masterfrom
vikuscz:combobox-aria-readonly-listbox
Aug 28, 2026
Merged

atomiks merged 5 commits into
mui:masterfrom
vikuscz:combobox-aria-readonly-listbox

Conversation

@vikuscz

@vikuscz vikuscz commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #5584

Follow-up to #5531 / #5530.

readOnly locks the value, not the interaction. #5531 made that true for Select. Combobox and Autocomplete still refused to open at all, so this brings them in line and adds the read-only ARIA state that was missing from the listbox and the trigger.

Behavior

Pointer and keyboard now open the popup and move the highlight while readOnly, so the user can see the available options and which one is selected. useDismiss was gated on readOnly too, so a defaultOpen read-only combobox could not be closed by Escape or an outside press. It now can.

Nothing commits a value. Item press, Enter on a highlighted item, closed-trigger typeahead, Clear, ChipRemove, chip removal with Backspace, Escape-to-clear, and hidden-input autofill stay gated on readOnly. The input keeps its native readonly attribute, so typing and filtering stay off.

One consequence worth naming: the popup stays open on Enter and on item press while readOnly. Those paths close it only as a side effect of committing a value, and nothing commits here. Dismissal is untouched, so Escape, an outside press, and the trigger all still close it.

ARIA

  • Combobox.List: aria-readonly when the root is readOnly and the list renders role="listbox", which the attribute is defined for. In grid mode it is deliberately omitted: on a grid the attribute speaks to cell editability rather than selection, and the combobox element carries the read-only state anyway. Combobox.List is the family's only listbox, since Combobox.Popup always renders dialog or presentation. Covers Autocomplete.List too, since it's the same component.
  • Combobox.Trigger: aria-readonly, but only when it renders with role="combobox" (inputInsidePopup), mirroring how aria-required is already gated on the same condition. Without that role the trigger is a plain button, where the attribute wouldn't apply (that's what [combobox][autocomplete] Remove aria-readonly prop from Clear and Popup components when readOnly #3907 removed from Clear and Popup), and in that composition the Combobox.Input outside the popup already exposes aria-readonly.
  • Combobox.Input: aria-autocomplete="none" while readOnly. The input accepts no text, so no completion of any kind is on offer.

@pkg-pr-new

pkg-pr-new Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@5541
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5541
    

commit: f79b671

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+136B(+0.03%) 🔺+25B(+0.02%)

Details of bundle changes

Performance

Total duration: 1,137.73 ms +107.94 ms(+10.5%) | Renders: 76 (+0) | Paint: 1,856.04 ms +189.51 ms(+11.4%)

Test Duration Renders
Tabs mount (200 instances) 270.31 ms 🔺+58.95 ms(+27.9%) 3 (+0)
Slider mount (300 instances) 127.66 ms 🔺+23.08 ms(+22.1%) 2 (+0)
Popover mount (300 instances) 47.75 ms 🔺+12.46 ms(+35.3%) 1 (+0)

12 tests within noise — details

Metric alarms

Test Metric Change
Tabs mount (200 instances) bench:paint 🔺 +84.17 ms
Slider mount (300 instances) bench:paint 🔺 +39.51 ms
Popover mount (300 instances) bench:paint 🔺 +22.63 ms

Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit f79b671
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a913b4f02dce10008c85ffc
😎 Deploy Preview https://deploy-preview-5541--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@vikuscz

vikuscz commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

The red Benchmark tests check is the same one I flagged on #5531, and since it has now happened on two separate PRs it doesn't look like flakiness: both times it failed in the Run baseline benchmarks at merge-base step — inside the /tmp/base-worktree checkout of master, before the head benchmarks ran — on tests/tooltip.bench.tsx:

AssertionError: Iteration 5 render events differ from iteration 0:
  expected [ 'bench:mount' ] to deeply equal [ 'bench:mount', 'bench:update', …(8) ]

Both runs also reported Tooltip mount (300 contained roots): 0.00ms (0 renders, 20 iterations) in the results summary, so that benchmark seems to capture nothing on master rather than measuring a regression. Jobs: 354337, 355277.

Nothing in this PR touches Tooltip, and it changes no behavior at all — just ARIA attributes.

@zannager zannager added the component: combobox Changes related to the combobox component. label Aug 21, 2026
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 27, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 28, 2026
@atomiks atomiks changed the title [combobox][autocomplete] Add aria-readonly to the listbox and the combobox trigger [combobox][autocomplete] Allow opening and browsing the popup while readOnly Aug 28, 2026
@atomiks atomiks added the component: autocomplete Changes related to the autocomplete component. label Aug 28, 2026
vikuscz and others added 4 commits August 28, 2026 17:27
…bobox trigger

Follow-up to mui#5531, which added `aria-readonly` to `Select`'s listbox. `Combobox.List`
(also `Autocomplete.List`) renders `role="listbox"` or `role="grid"`, both of which
`aria-readonly` is defined for, and it carried no read-only state at all.

`Combobox.Trigger` gets it only when it renders with `role="combobox"`, mirroring how
`aria-required` is already gated: without that role the trigger is a plain button, where
the attribute wouldn't apply (mui#3907), and the `Combobox.Input` outside the popup already
exposes the state.
@atomiks
atomiks force-pushed the combobox-aria-readonly-listbox branch from 743006c to 721ebef Compare August 28, 2026 07:27
@atomiks
atomiks merged commit 7c4447e into mui:master Aug 28, 2026
7 checks passed
arturbien added a commit to whopio/frosted-ui that referenced this pull request Sep 8, 2026
## Summary

Upgrades `@base-ui/react` from `^1.7.0` → `^1.8.0` (latest, published
Sep 4, 2026).

No Frosted UI source changes were required. Validated locally:
- `tsc` (CJS + ESM) ✅
- `eslint` + `stylelint` ✅
- `vitest` — 312/312 tests passing ✅

Sources: [Base UI v1.8.0 release
notes](https://base-ui.com/react/overview/releases/v1-8-0), [GitHub
CHANGELOG](https://github.com/mui/base-ui/blob/master/CHANGELOG.md).

---

## Breaking changes

**Official changelog marks no breaking changes in v1.8.0.**

A few behavioral / API additions consumers (and Frosted UI wrappers)
should be aware of:

| Area | Change |
|---|---|
| Avatar | New `keepMounted` prop on `<Avatar.Image>`
([#5536](mui/base-ui#5536)) — Frosted already
forwards image props, so this is available automatically |
| Combobox | New `createItems` collection API
([#5326](mui/base-ui#5326)) |
| Toast | `update()` can take a function derived from the current toast
([#5464](mui/base-ui#5464),
[#5611](mui/base-ui#5611),
[#5629](mui/base-ui#5629)) |
| Autocomplete / Combobox / Select | Popup can open and be browsed while
`readOnly` ([#5541](mui/base-ui#5541),
[#5531](mui/base-ui#5531)) |
| Navigation Menu | Focus stays on the trigger when opening
([#5479](mui/base-ui#5479)) |
| Field | Neutral validity is published while async validation is in
flight ([#5600](mui/base-ui#5600)) |
| Dialog / Alert Dialog / Popover | Outside clicks from presses that
began before open are ignored
([#5378](mui/base-ui#5378)) |
| Scroll Area | Scrollbars no longer steal focus
([#5430](mui/base-ui#5430)) |

### Frosted UI impact assessment

| Concern | Status |
|---|---|
| Compile / typecheck against 1.8.0 | Passes with no source edits |
| Existing `DialogRootActions` / `AlertDialogRootActions` imports |
Still exported |
| `useRender` / `mergeProps` | Unchanged public surface |
| Toast manager `update()` | Still compatible; functional updates are
additive |
| Combobox `useFilter` re-export | Still present |

---

## Full v1.8.0 changelog (from
[upstream](https://base-ui.com/react/overview/releases/v1-8-0))

_Sep 4, 2026_

### General changes

- Fix label association when a control unregisters (#5456)
- Reduce animation completion work (#5535)
- Fix prop and ref merging for lazy render elements (#5562)
- Fix roving focus when items are added or removed (#5447)
- Fix hover and focus interaction issues (#5037)
- Improve trigger mount performance (#5426)
- Fix disabled anchor tracking on scroll (#5478)
- Fix transform origin for start/end alignment (#5015)
- Remove duplicate options key from arrow middleware (#5606)
- Register passive touch listeners (#5572)

### Alert Dialog

- Ignore outside clicks from presses that began before open (#5378)

### Autocomplete

- Render groups with the rowgroup role in grid mode (#5564)
- Allow opening and browsing the popup while `readOnly` (#5541)
- Move `aria-orientation` to the role owners (#5551)
- Hide group labels and scrollbars from the accessibility tree (#5598)

### Avatar

- Add `keepMounted` prop to `<Avatar.Image>` (#5536)

### Checkbox

- Fix stale and duplicated control IDs (#5457)
- Fix controlled blur validation and stale filled state (#5563)

### Checkbox Group

- Fix stale and duplicated control IDs (#5457)

### Combobox

- Fix applying `data-readonly` to `<Combobox.Trigger>` (#5418)
- Add `createItems` collection API (#5326)
- Fix cancellation when preserving the filter after selection (#5362)
- Render groups with the rowgroup role in grid mode (#5564)
- Allow opening and browsing the popup while `readOnly` (#5541)
- Move `aria-orientation` to the role owners (#5551)
- Fix record item label lookup reading from `Object.prototype` (#5518)
- Anchor multiple selection to the first selected item with a linear
lookup (#5573, #5613)
- Hide group labels and scrollbars from the accessibility tree (#5598)

### Dialog

- Ignore outside clicks from presses that began before open (#5378)

### Drawer

- Ignore swipes without an attributed direction when using snap points
(#5477)
- Respect canceled snap point dismissal (#5571)
- Ignore the page scroller when starting a swipe (#5567)

### Field

- Fix custom validity ownership and validation lifecycle (#5449)
- Sync controlled value changes with field state (#5460)
- Fix stale and duplicated control IDs (#5457)
- Validate once on Enter inside a Form (#5459)
- Publish neutral validity while async validation is in flight (#5600)
- Fix controlled blur validation and stale filled state (#5563)

### Form

- Fix `clearErrors` dropping updates when multiple fields change at once
(#5446)

### Menu

- Play the enter transition for an initially open submenu (#4383)
- Move `aria-orientation` to the role owners (#5551)
- Hide group labels and scrollbars from the accessibility tree (#5598)

### Menubar

- Fix menubar accessibility tree to satisfy `aria-required-children`
(#5058)

### Navigation Menu

- Fix pointer-events lock when sweeping quickly across a trigger (#5454)
- Keep focus on trigger when opening (#5479)
- Add disabled data attribute to `<NavigationMenu.Trigger>` (#5521)

### Number Field

- Stop incrementing when disabled during press-and-hold (#5435)
- Prevent scrubbing on horizontal wheel events (#5463)
- Preserve native and consumer-controlled selection when focusing the
input (#5578, #5619)

### Popover

- Ignore outside clicks from presses that began before open (#5378)
- Fix detached trigger store migration (#5442)

### Scroll Area

- Hide group labels and scrollbars from the accessibility tree (#5598)
- Prevent scrollbars from stealing focus (#5430)

### Select

- Move `aria-orientation` to the role owners (#5551)
- Anchor multiple selection to the first selected item with a linear
lookup (#5573, #5613)
- Hide group labels and scrollbars from the accessibility tree (#5598)
- Fix the root ID being ignored inside a Field (#5461)
- Remove redundant size check in `<Select.Positioner>` (#5469)
- Allow opening and browsing the popup while `readOnly` (#5531)
- Fix record item label lookup reading from `Object.prototype` (#5518)

### Slider

- Prevent update loops from unstable refs (#5441)

### Switch

- Fix controlled blur validation and stale filled state (#5563)

### Tabs

- Prevent update loops from unstable refs (#5441)
- Consider 3D transforms when positioning the indicator (#4852)

### Toast

- Allow functional toast updates derived from the current toast (#5464,
#5611, #5629)

### Tooltip

- Respect trigger delay with zero provider delay (#5444)

---

## Test plan

- [x] Bump `@base-ui/react` to `^1.8.0` and refresh lockfile
- [x] `pnpm --filter=frosted-ui exec tsc --project tsconfig-esm.json
--noEmit`
- [x] `pnpm --filter=frosted-ui build:js` (CJS + ESM)
- [x] `pnpm --filter=frosted-ui lint`
- [x] `pnpm --filter=frosted-ui test` (312 tests)
- [x] CI green on this PR
- [ ] Spot-check Storybook surfaces that wrap Base UI heavily (Combobox,
Select, Dialog, Menu, Toast, Field) if desired before merge


Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. component: combobox Changes related to the combobox component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[combobox][autocomplete] readOnly prevents opening the popup, same gap #5531 fixed for Select

3 participants