Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#29715 closed defect (bug) (fixed)

Not-unique accesskey values may break quick edit and bulk edit form submission

Reported by: afercia's profile afercia Owned by: helen's profile helen
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: Quick/Bulk Edit Keywords: has-patch
Focuses: ui, accessibility Cc:

Description

Please try this in Chrome:

  • go in the posts listing screen
  • don't click anything, just activate the "s" accesskey (e.g. Alt + s on Windows)

or:

  • go in the posts listing screen
  • click "Quick Edit" for a post
  • activate the "s" accesskey (e.g. Alt + s on Windows)

You've just submitted the whole inline-edit/bulk-edit form. see screenshot, notice all the parameters in your browser's address bar. When the page reloads, it will try to display posts based on those (mostly empty) parameters and the result will be 0 posts.

Try the same in Firefox (Alt + Shift + s on Windows): nothing happens. Click "Quick Edit" and try Alt + Shift + c to cancel: Firefox won't even move the focus from the focused input.

Browsers behaviour is really messy with not-unique accesskey values. As far as I see there are 3 places in WordPress where this happens:

  1. post listings
  2. categories and tags listings
  3. Quicktags in the edit post and new post screens

About 1 and 2, please notice that when you "Quick edit", the "inline edit" part of the form (hidden with CSS) gets cloned and populated. Of course, accesskey attributes get cloned too.

The proposed patch simply removes accesskeys for 1 and 2. For a strong opinion about accesskeys, see @joedolson comment.

About Quicktags, see #29358, #28173 and #21460.

There's one more accesskey: the "p" on the Publish button. I'd suggest to remove that too unless there are strong opinions to keep it.

Attachments (2)

29715.patch (2.2 KB) - added by afercia 10 years ago.
remove accesskey attributes from Quick Edit and Bulk Edit in posts, categories and tags listings
29715.2.patch (5.2 KB) - added by afercia 10 years ago.

Download all attachments as: .zip

Change History (10)

@afercia
10 years ago

remove accesskey attributes from Quick Edit and Bulk Edit in posts, categories and tags listings

#1 @afercia
10 years ago

  • Component changed from General to Quick/Bulk Edit
  • Focuses ui accessibility added
  • Version set to 4.0

#2 @afercia
10 years ago

  • Keywords has-patch added

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


10 years ago

#4 @joedolson
10 years ago

Kill all accesskeys. They are the tools of the devil.

But seriously, they do much more harm than good.

@afercia
10 years ago

#5 @afercia
10 years ago

Updated patch removes also the last accesskey attributes used on the id="publish"button.
Whit this, core should be accesskey-free :) please post a comment if you find some accesskey we may have missed.

#6 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.2

#7 @helen
10 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 31331:

Accessibility: remove remaining instances of accesskey.

It is a poorly implemented browser feature, not particularly discoverable, and causes more problems than it helps solve.

props afercia.
fixes #29715.

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


9 years ago

Note: See TracTickets for help on using tickets.