List of steps to reproduce (step by step, including full links if applicable):
- Open any dialog window in VE, e.g. the interface of Kartographer, or insert a template.
- Click into the browser's address bar.
- Use the tab key to access all elements.
What happens?:
Everything in the page behind the interface behind the popup is in the tab order, when tabbing out from the location bar. If the user clicks into the dialog before tabbing, this is not the case and focus is constrained to dialog elements.
We dug a bit into the code and found something called "focusTrap" in the OOUI Window class. This is responsible for trapping the focus within a window, as long as the focus starts in the dialog. When starting from e.g. the browser's address bar it doesn't work.
What should have happened instead?:
Only the the keyboard-interactable elements of the dialog should be in the tab order.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
Firefox 78 and 100
