WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 18 months ago

Last modified 18 months ago

#39528 closed defect (bug) (wontfix)

Autofocus on admin pages for keyboard users

Reported by: szepe.viktor Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: Administration Keywords:
Focuses: accessibility Cc:

Description

Please bring back autocofus on Plugin and Theme page.

It was https://core.trac.wordpress.org/changeset/21143

Also consider Ppost editor pages: the search box also.

Thank you.

Attachments (1)

39528.diff (1.3 KB) - added by andraganescu 18 months ago.

Download all attachments as: .zip

Change History (6)

@andraganescu
18 months ago

#1 @andraganescu
18 months ago

  • Keywords has-patch added

Added a patch which enables autofocus to the themes and plugins screens. @afercia do you think this poses any a11y issues? I couldn't find why the autofocus functionality was originally removed.

#2 @afercia
18 months ago

  • Focuses accessibility added
  • Keywords close added

@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.

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


18 months ago

#4 @audrasjb
18 months ago

  • Keywords has-patch close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

As discussed during today's Accessibility team bug scrub, I'm going to close this ticket as wontfix since autofocus is not appropriate in this case (see comment 2).

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


18 months ago

Note: See TracTickets for help on using tickets.