Open
Description
Issue summary
There is a focus management issue prevalent across the Admin. Many of the Page secondary actions in the Admin - e.g. Import, Export, Duplicate, etc. - open a modal, and currently there is no easy way to return focus to the modal activator when the activator is the secondary action of the Page component that doesn't support it.
Expected behavior
Ability to connect Page secondary actions to the modal or any other overlay to be able to return focus to the activator.
For example, by adding the ability to provide an activatorRef
to <Page />
's secondaryActions
to then pass it to the <Modal />
as an activator
.
Actual behavior
No ability to connect <Page />
's secondary actions to the overlay they open.
Steps to reproduce the problem
- Open any section that has secondary actions that open a modal.
1.1. Example actions: Export, Import, Duplicate.
1.2. Example pages: Discount index, Product index, Product details, Variant details. - Use keyboard tab to navigate through the page
- Activate the action to open a modal
- Close modal or cancel out of it
- See the focus returns to the top of the page instead of the modal activator