Description
Feature Description
WHAT: For Angular Material components that have a focus() method, allow for the origin param to be optional and remove the default origin value.
WHY: For cases where the focus() method is called and the origin is already defined, we don’t want to override the origin using focusVia to always be some default value. In many cases, we want to leave the origin unchanged, but if there are cases that need the origin to be updated, allow for this with an optional origin param.
Use Case
If the focus origin value is keyboard, and some interaction happens where we want to set focus to another element somewhere on the page by explicitly calling focus(), then in cases where the focus origin should remain the same, the current implementation causes the origin to change and the interaction to be weird. This is also due to the fact that we use a single, global focus monitor attached to the document body in eventual detection mode.
Here are the components to update:
-button
-checkbox
-menu item
-menu trigger
-radio
-expansion panel header
-slide toggle
-step header