[wp-trac] [WordPress Trac] #39528: Autofocus on admin pages for keyboard users
WordPress Trac
noreply at wordpress.org
Tue Apr 30 15:56:33 UTC 2019
#39528: Autofocus on admin pages for keyboard users
-----------------------------+------------------------------
Reporter: szepe.viktor | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch close | Focuses: accessibility
-----------------------------+------------------------------
Changes (by afercia):
* keywords: has-patch => has-patch close
* focuses: => accessibility
Comment:
@andraganescu thanks for the ping. Generally, initial focus should be set
on an element only if there's one, specific, available, user workflow.
This is not the case in the themes and plugins screens, as the search is
only one of the various available flows.
Setting initial focus on the search input would be an assumption that
users want to do a search. However, they may want to do many other things
:) While setting focus on an input isn't a big issue for mouse users on
desktop, it's annoying and not accessible for other users. For example:
- keyboard and screen reader users would be forced to "skip" relevant
parts of the UI, making very difficult to even figure out what was skipped
and forcing them to explore the page tabbing backwards
- on mobile, autofocus on an input field can trigger the on-screen
keyboard to appear, which should happen only after an explicit user action
For these reasons, `autofocus` should be used only when there's one
specific task to accomplish. I think in WordPress it's now only used in
the login / install screens and in the new post page.
I'd lean towards advising against this change, but I'd propose to discuss
this issue in the next accessibility team meeting (on Friday at 15:00 UTC
in the Slack #accessibility channel).
As per the removal of these attributes:
- The plugin install search field autofocus was removed in WordPress 4.0,
see [29218]
- The Add Themes and the Themes pages were refactored to use the
JavaScript powered interface in [27499] and [26141] and their search field
doesn't use autofocus since then. Worth noting the old `wp-admin/includes
/theme-install.php` page still lives in core but it's no longer used.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39528#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list