This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit 47106ba
committed
fix(autocomplete): change md-escape-options default to 'clear'
- previously the default was `'blur clear'`
- clean up tests, remove unused injections, variables, missing spaces, semi-colons
Fixes #11767
BREAKING CHANGE: The default behavior of `md-autocomplete`, when the options panel is visible and the Escape key is pressed, has changed. `md-escape-options` now defaults to `'clear'` instead of `'blur clear'`. This better aligns with the [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.0pattern/combobox-autocomplete-list.html) as the focus is not sent to another element (like the `<body>`) when the Escape key is pressed.
If you want to restore the previous behavior, add the following to your `md-autocomplete` components:
```html
md-escape-options="blur clear"
```1 parent 98a94db commit 47106ba
File tree
4 files changed
+45
-60
lines changed- src/components/autocomplete
- demoBasicUsage
- js
4 files changed
+45
-60
lines changed
0 commit comments