Summary
The AutocompleteNoOptions container has a hardcoded role="presentation" that cannot be overridden via any public API. Per WAI-ARIA, this role removes implicit semantics from the element and propagates to owned children. Some AT (NVDA,
older JAWS) honour this and do not announce the "no results" text to users.
Steps to reproduce
- Render an
<Autocomplete> with a noOptionsText prop
- Type something that returns no results so the popup opens with no options
- Inspect the DOM — the noOptionsText wrapper has
role="presentation"
- Test with NVDA or older JAWS — the "no options" text is not announced
Current behavior
AutocompleteNoOptions is rendered with a hardcoded role="presentation":
// node_modules/@mui/material/esm/Autocomplete/Autocomplete.js ~line 717
<AutocompleteNoOptions
className={classes.noOptions}
ownerState={ownerState}
role="presentation" // ← hardcoded, not overridable
onMouseDown={event => { event.preventDefault(); }}
>
{noOptionsText}
</AutocompleteNoOptions>
There is no public API to override the container role — noOptionsText only controls the content, and there is no slots.noOptions or equivalent.
Expected behavior
Either:
a) Remove role="presentation" from the container — the <li> element inside a role="listbox" already provides the correct context and does not need the role suppressed, or
b) Expose the container as a configurable slot (slots.noOptions) so consumers can set or remove the role themselves.
Context
- MUI version: 7.3.9
- Tested with: Chrome + NVDA, Safari + VoiceOver
- Related: the Popper slot also ships with a hardcoded role="presentation" in additionalProps, but that one can be overridden by consumers via slotProps.popper since slotProps merges last in mergeSlotProps.
**Search keywords**:
Summary
The
AutocompleteNoOptionscontainer has a hardcodedrole="presentation"that cannot be overridden via any public API. Per WAI-ARIA, this role removes implicit semantics from the element and propagates to owned children. Some AT (NVDA,older JAWS) honour this and do not announce the "no results" text to users.
Steps to reproduce
<Autocomplete>with anoOptionsTextproprole="presentation"Current behavior
AutocompleteNoOptionsis rendered with a hardcodedrole="presentation":