Skip to content

[Autocomplete] disabled item can be highlighted #4666

@rohanchkrabrty

Description

@rohanchkrabrty

Bug report

Current behavior

A disabled Autocomplete Item can be focused/highlighted using keyboard and pointer events and ends up with the data-highlighted attribute.

<Autocomplete.Item value="test" disabled>
   Test
</Autocomplete.Item>

Expected behavior

The disabled items should not be interactive and shouldn't have data-highlighted attribute.

Reproducible example

https://stackblitz.com/edit/2fydq8ct?file=src%2FApp.tsx

Base UI version

v1.4.1

Which browser are you using?

Chrome

Which OS are you using?

Mac OS

Which assistive tech are you using (if applicable)?

Not applicable

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: autocompleteChanges related to the autocomplete component.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions