-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
Bug, feature request, or proposal:
Menu should return focus to the host element when closed.
What is the expected behavior?
When a menu is closed, focus should go back to the host element that called the menu.
What is the current behavior?
The focus is being lost and sent to body element.
What are the steps to reproduce?
- Open the first menu in https://material.angular.io/components/menu/overview
- Close it by pressing ESC or choosing one of the options.
- check document.activeElement using the developer console. Or, press TAB to see that the focus is set on the first element of the DOM.
What is the use-case or motivation for changing an existing behavior?
Losing focus in a middle of a workflow is really bad for a11y.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
My set up: Angular 2, Material 2, TS, Mac, Chrome
Is there anything else we should know?
buganizer: b/64452100
Metadata
Metadata
Assignees
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent