Closed
Description
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
I tried creating mat-autocomplete with multiselect options along with a checkbox following a StackOverflow answer:
https://stackoverflow.com/a/50569422/8043493
The functionality works fine, but the aria-selected
attribute for the selected option is false
. I tried setting it explicitly using attr.aria-selected
, but it is not working.
Reproduction
StackBlitz link: https://stackblitz.com/edit/w8j5bi2o
Steps to reproduce:
- Select an option from the autocomplete.
- Navigate to the same option with a screen reader opened, OR check the aria-selected attribute value for the selected mat-option.
Expected Behavior
The selected mat-option
should have aria-selected
as true
.
Actual Behavior
The selected mat-option
has aria-selected
as false
.
Environment
- Angular: 15.0.5
- CDK/Material: 15.2.9
- Browser(s): Edge
- Operating System (e.g. Windows, macOS, Ubuntu): Windows