Popups
Popups are not a good user experience for keyboard-only users and screen reader users and as a rule of thumb should be avoided.
...
New windows should not automatically be launched, and change context, when a component receives focus.
Modal Windows
If there is no other solution than a popup use a modal window. It must be programmed in a way that allows for the following.
...
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal
New Windows
Ensure that keyboard focus is visible and not obscured when a new window is opened, so users can easily identify where they are within the content. Keyboard focus indicators cannot be obscured by a popup window.
Prevent changes in content that have not been initiated by the user and that could obscure the focus or distract users.