bug(mat-select): lose the focus when no selection is made by pressing ESC #30632
Labels
area: material/select
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
15
Description
When the mat-select is expanded, if user tries to close it with the "ESC" key without making a selection, the focus is lost and goes at the bottom of the page.
Tested in desktop environment with all major browsers and screen-readers.
Reproduction
Example with the Angular latest version:
Steps to reproduce:
For example with NVDA:
Expected Behavior
For reference take the native example where the select should collapse when pressing the "ESC" key and the screen-reader focus remains on the select element.
Notice that in Angular Material v14 or v15, the correct behavior is the following:
while the select is open and the screen-reader is in the focus mode, if you press the "ESC" key one time the select closes but the focus mode not. Afther that, if you press "ESC" again the NVDA focus mode will deactivate and the focus will be placed where it was before you started the interaction.
Actual Behavior
Same as Reproduction
Environment
The text was updated successfully, but these errors were encountered: