Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#34756 closed defect (bug) (fixed)

Accessibility improvements for Posts Quick Edit and Bulk Edit

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.3
Component: Quick/Bulk Edit Keywords: has-patch commit
Focuses: ui, accessibility, javascript Cc:


As done in #34613 for the Tags and Categories Quick Edit form, it would be nice to improve keyboard interaction in the Posts Quick/Bulk Edit forms and avoid focus losses.
When saving or canceling is done with JavaScript, the corresponding focused button gets hidden so focus is lost.
Some browser (e.g. Firefox) are smarter and try to keep focus "in place" but Chrome and other ones lose focus and force users to start tabbing again from the document root.

Also, there is no audible feedback message for screen reader users when saving is successful.

Attachments (3)

34756.patch (3.8 KB) - added by afercia 9 years ago.
34756.2.patch (4.2 KB) - added by afercia 8 years ago.
34756.3.patch (4.3 KB) - added by afercia 8 years ago.

Download all attachments as: .zip

Change History (10)

#1 @afercia
9 years ago

First pass. For Quick Edit, when pressing Cancel or Update, focus is moved back to the Post title. When saving is successful or gives error, a message is dispatched to wp.a11y.speak()

For Bulk Edit: when saving, there's a page reload so there's nothing to do with JavaScript.
When pressing "Cancel", there may be several Post checked for editing, need to make a decision about where focus should be moved back. For now, it is moved back to the first checked checkbox in the Posts list. Would like to discuss a bit this with the Accessibility Team and anyone who may be interested of course :)

Last edited 8 years ago by afercia (previous) (diff)

9 years ago

#2 @afercia
9 years ago

  • Keywords has-patch added

#3 @afercia
8 years ago

  • Milestone changed from Awaiting Review to 4.5
  • Owner set to afercia
  • Status changed from new to assigned

8 years ago

#4 @afercia
8 years ago

  • Keywords commit added

Refreshed patch. Since [35771] the row action links are always focusable, even when they're not visible. This allows to move focus back to the most logical place, i.e. the UI control that opened the Quick/Bulk edit form. So, to recap:

  • Quick Edit "Cancel" or "Update" will move focus back to the Quick Edit link
  • Bulk Edit "Cancel" will move focus back to the "Apply" top or bottom Bulk Actions button
  • Bulk Edit "Update" reloads the page, nothing to do here

Note: a similar change should be done also for inline-edit-tax.js.

#5 @afercia
8 years ago

There are a couple of things left to make the Bulk Edit usable with a keyboard, like making the delete "X" focusable and setting the initial focus on the form. Will handle them in a separate ticket.

8 years ago

#6 @afercia
8 years ago

Refreshed patch, forgot to import wp.

#7 @afercia
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 36303:

Accessibility: Improve focus handling and audible feedback on the Posts Quick-Bulk Edit.

Avoids a focus loss when saving or closing the form moving focus back to a proper place.
Uses wp.a11y.speak() to dispatch successful edits and error messages to screen readers.

Fixes #34756.

Note: See TracTickets for help on using tickets.