Skip to content

bug(autocomplete): matAutocomplete attribute on input tags should not add role="combobox" #33401

@csirota97-a11y

Description

@csirota97-a11y

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Marking an input field as a autocomplete adds role="combobox" attribute which violates WCAG ITEM: 4.1.2 Name, Role, Value.

Reproduction

StackBlitz link:
Steps to reproduce:

  1. https://stackblitz.com/edit/components-issue-starter-xjowe1gm?file=src%2Fmain.ts
  2. Use browser console to see that input tag has role="combobox"

Expected Behavior

input tag role should accurately reflect input tag

Actual Behavior

input tag has role="combobox" when autocomplete is used

Environment

  • Angular: 18-22* not tested on earlier versions
  • CDK/Material: 18-22
  • Browser(s): Edge, Chrome, Safari
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac and Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions