Actions should never lead to new windows unless explicitly requested by the user
See original GitHub issueWagtail opens new windows and there is no way for the user to prevent that.
- A user has always the option to open a link in a new window, CMD+click (OSX).
- When a link has
target="_blank"
, there is no method to open that link in the current window.
So, target="_blank"
takes away the control from the user. This leads to many windows. This is a frustrating experience.
Let’s remove all target="_blank"
from Wagtail.
Actions that always lead to new windows are:
- Live button
- Preview button
- In status messages, edit and view draft buttons.
- Preview for moderation links
- View draft
- Revisions view
- …
The only place where a new window could be justified is during editing of a page (unsaved draft) and clicking Preview. Navigating away from an unsaved complex form isn’t desirable. You don’t want to loose your work. But the current method opens a new window, the form is out of sight. So the current situation is not ideal either.
The preview button could read “Save draft and preview” and open in the same window. Making sure the user never looses work.
We also can add a secondary option “Preview unsaved changes in new window”. Which explains what will happen, and makes opening a new window an explicit action.
I’d like some input of UX and accessibility experts on this topic.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (9 by maintainers)
Top GitHub Comments
Hi @thibaudcolas, I’d like to take up this issue ! I am a student aiming for GSoC '21 in Wagtail.
Okay, so this is a valid issue for those situations. I’ll try to pick this up.