WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#42540 new defect (bug)

Don't move focus to the editor when switching editor mode

Reported by: afercia Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Editor Keywords: needs-patch
Focuses: ui, accessibility, javascript Cc:

Description

Splitting this out from #42530.

When switching the classic editor from "Text" mode to "Visual" mode, the editor area is focused. Worth noting this is a TinyMCE behavior, not something WordPress does. For a number of years it always worked this way, with a few exceptions. For example, in 4.8.3 the editor is not focused for me, not sure if something changed in TinyMCE.

Regardless of what happened to TinyMCE, I'd propose to finally discuss this behavior and evaluate if it's a good one for all users. It was discussed sometimes in the past, as part of other issues, see for example #30490 but never fully addressed.

This issue is even more relevant now that #41962 is going to move focus to the editor in both Visual and Text mode, when there is a selection.

Moving focus programmatically is often problematic because it generally assumes just one, specific, workflow.

From an usability perspective, moving focus to the editor assumes users want to start typing immediately. This may or may not be true. It's an assumption.

From an accessibility perspective, unexpectedly switching context is a huge concern. See also the discussion on #42530.

Any thoughts and discussione welcome!

Change History (2)

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 months ago

#2 @afercia
7 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.0
Note: See TracTickets for help on using tickets.