Skip to content

feat(combobox): deprecate variant="inline-listbox" with multiple - #3296

Merged
interactivellama merged 4 commits into
masterfrom
feat/combobox-deprecate-inline-multiple
Nov 11, 2026
Merged

interactivellama merged 4 commits into
masterfrom
feat/combobox-deprecate-inline-multiple

Conversation

@interactivellama

@interactivellama interactivellama commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Additional description

Deprecates Combobox variant="inline-listbox" with multiple. It keeps working and logs a one-time warning that points to variant="base" with multiple. inline-listbox without multiple is unaffected.

Why

  • SLDS has deprecated the inline listbox pattern (combobox/deprecated-inline-listbox). The current ListboxPills blueprint puts a labelled listbox of pills after the combobox.
  • It is hard to use with a screen reader. The selected pills render before the input, so users hear the selections before they reach the field.
  • Its pill container is a role="listbox" with no accessible name, so axe reports aria-input-field-name. The label is on the inner role="group" list. That violation is already on master. It isn't fixed separately here, because the variant is going away and base multiple passes axe.

Changes

  • check-props.js: a deprecated-property-value warning when variant === 'inline-listbox' && multiple
  • The variant doc comment notes the deprecation. TS @deprecated can't target one value combined with another prop.
  • The InlineMultiple and InlineMultipleLoading stories are labelled "(deprecated)" and their descriptions point to base. Story export names are unchanged, so the snapshots don't change.
  • The inline-multiple examples get a deprecation comment, and their component.json heading is labelled deprecated.
  • CHANGELOG ### Deprecated entry with the migration
  • Tests: the warning fires once for inline-listbox multiple, and doesn't fire for inline-listbox single or base multiple.

The removal in the next major is tracked in ROADMAP.md on the v11 P1 theme 3 branch.

Migration: replace variant="inline-listbox" with variant="base" (keep multiple). The selected pills move below the input.

npm run test:ci passes: 81 files, 1592 tests, 0 lint errors.


CONTRIBUTOR checklist (do not remove)

Please complete for every pull request.

Green gate — all of these must pass locally (CI runs the same):

  • npm run lint passes with 0 errors (npm run lint:fix to auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.
  • npm run typecheck is clean (tsc --noEmit).
  • npm test -- --run passes — this runs both Vitest projects (jsdom unit + real-browser browser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots with npm test -- --run -u and review the diff.
  • npm run build succeeds (type-check + Vite library build + .d.ts + entry shims).

Behavior & docs:

  • First-time contributors: sign the CLA (a bot will comment with instructions).
  • Added/updated Vitest + React Testing Library tests for the change (template: components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a *.browser.test.jsx file (the browser project); everything else is jsdom.
  • Reviewed the component's Storybook stories: npm run storybook → http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server).
  • Story/example code uses the component's real prop API (e.g. slots like content / visualPickerFigure, render props like renderItem, icon props, events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check against components/<name>/__examples__.
  • Storybook Accessibility (a11y) panel shows no new violations for the affected stories.
  • If you added or changed a type, remember runtime PropTypes were removed in the TS migration — types are the contract. Ship accurate .d.ts (they're generated by the build); JS consumers rely on them via editor type-acquisition.

REVIEWER checklist (do not remove)

  • CI is green (GitHub Actions CI workflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.
  • Change has adequate test coverage; bug fixes include a regression test.
  • Reviewed the affected Storybook stories and their a11y panels.
  • Rendered markup still conforms to SLDS — check the story HTML snapshot diff (components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).
  • Public API / package surface: if exports changed, the deep-import contract still holds (@salesforce/design-system-react/components/<name> and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change → feat!:/BREAKING CHANGE: and a major version bump.

The SLDS markup puts role="combobox" on the .slds-combobox wrapper and
role="textbox" on the input, but aria-controls was only set on the input.
An expanded role="combobox" without aria-controls fails axe
aria-required-attr (W-24839159).

Set aria-controls on the wrapper in all six render paths: the listbox id
for base, inline-listbox and readonly, and the dialog id (following any
id set through popover props) for variant="popover". It is set only
while the target is rendered, and the input uses the same value.
The `.slds-combobox` wrapper had role="combobox" with aria-expanded,
aria-haspopup, aria-controls and aria-owns (the ARIA 1.1 pattern), and
the input was role="textbox". The SLDS blueprint and ARIA 1.2 put
role="combobox", aria-expanded, aria-haspopup and aria-controls on the
focusable input, with the wrapper presentational.

Move them to the input in all six render paths and drop aria-owns.
aria-expanded follows the rendered listbox, so it is false while
disabled. aria-autocomplete="list" stays only on the autocomplete
variants (base, inline-listbox); readonly and popover take no typed
input.

axe reports no aria-required-attr violation in any variant, open or
closed.

BREAKING CHANGE: role="combobox" and its aria-expanded, aria-haspopup
and aria-controls are on the input, not the .slds-combobox wrapper, and
the wrapper no longer sets aria-owns. Queries such as
getByRole('combobox') now return the input.
SLDS deprecated the inline listbox. It renders the selected pills before
the input, so screen reader users meet the selections before the field,
and its pill listbox has no accessible name (axe aria-input-field-name).
Warn once and point to variant="base" with multiple, which lists the
selections after the input in a labelled listbox.
@interactivellama
interactivellama force-pushed the feat/combobox-deprecate-inline-multiple branch from 54e4efb to 401f34a Compare November 11, 2026 07:39
@interactivellama
interactivellama changed the base branch from master to fix/combobox-aria-controls November 11, 2026 07:39
Niznikr
Niznikr previously approved these changes Nov 11, 2026
Base automatically changed from fix/combobox-aria-controls to master November 11, 2026 19:27
@interactivellama
interactivellama dismissed Niznikr’s stale review November 11, 2026 19:27

The base branch was changed.

@interactivellama
interactivellama merged commit a30725a into master Nov 11, 2026
11 checks passed
@interactivellama
interactivellama deleted the feat/combobox-deprecate-inline-multiple branch November 11, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants