Opened 7 years ago
Last modified 6 years ago
#42540 new defect (bug)
Don't move focus to the editor when switching editor mode
Reported by: | afercia | Owned by: | |
---|---|---|---|
Milestone: | Future Release | 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!
The 5.1 release beta 1 is today. Punting to Future Release.