Skip to content

[Autocomplete][material-ui] Missing aria-multiselectable attribute when multiple prop is set #44417

Open
@masonlouchart

Description

@masonlouchart

Steps to reproduce

https://stackblitz.com/edit/vitejs-vite-kcvsmw?file=src%2FApp.tsx&view=editor

Current behavior

The Autocomplete component has multiple set to true.
React Testing Library deselectOptions fails.

The documentation says:

Selecting multiple options and/or deselecting options of HTMLSelectElement is only possible if multiple is specified.

I expected it to work.

Expected behavior

We can use deselectOptions on an Autocomplete when multiple is set to true.

Context

Please see: https://stackblitz.com/edit/vitejs-vite-kcvsmw?file=src%2FApp.tsx&view=editor
This issue is similar to #38631

Your environment

npx @mui/envinfo
  System:
    OS: Linux 5.0 undefined
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  Browsers:
    Chrome: Not Found
  npmPackages:
    @emotion/react:  11.13.3 
    @emotion/styled: ^11.13.0 => 11.13.0 
    @mui/core-downloads-tracker:  6.1.7 
    @mui/material: ^6.1.7 => 6.1.7 
    @mui/private-theming:  6.1.7 
    @mui/styled-engine:  6.1.7 
    @mui/system:  6.1.7 
    @mui/types:  7.2.19 
    @mui/utils:  6.1.7 
    @types/react: ^18.3.12 => 18.3.12 
    react: ^18.3.1 => 18.3.1 
    react-dom: ^18.3.1 => 18.3.1 
    typescript: ~5.6.2 => 5.6.3

Search keywords: autocomplete multiple aria-multiselectable

Metadata

Metadata

Assignees

Labels

accessibilitya11ycomponent: autocompleteThis is the name of the generic UI component, not the React module!ready to takeHelp wanted. Guidance available. There is a high chance the change will be accepted

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions