Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32540 closed defect (bug) (fixed)

Media modal: impossible to unselect multiple selection using keyboard only

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords:
Focuses: accessibility, javascript Cc:


To reproduce:

  • Edit a Post > Add Media
  • do a multiple selection, either in Insert Media (Ctrl+click) or in the other views (Create Gallery, Playlist, etc.)
  • using your keyboard navigate to one of the selected attachments to focus the "check" icon
  • the check icon changes in a "minus"
  • press Enter: the attachment is still selected, focus is moved to details

Try the same thing but with just one attachment selected:

  • press Enter while focusing the minus icon: the attachment gets correctly unselected

Please notice the "check/minus" icon is a link, for accessibility and semantics should be a button and there's a ticket for that: #26550

Change History (4)

#1 @afercia
9 years ago

Looks like when pressing Enter on the "check icon", checkClickHandler doesn't run at all and toggleSelectionHandler runs instead. Has to do with the way events are bound here and events bubbling. Probably toggleSelectionHandler needs to return early if the event target is the check icon.

#2 @afercia
9 years ago

Related: #26550 since the "check" link should be changed in a button element.

#3 @afercia
9 years ago

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

#4 @afercia
9 years ago

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

Fixed in 32952 as part of #26550.

Note: See TracTickets for help on using tickets.