[wp-trac] [WordPress Trac] #40578: Media Library: Clicking the edges of the media does not select, it only focuses the li.

WordPress Trac noreply at wordpress.org
Mon May 1 14:50:22 UTC 2017


#40578: Media Library: Clicking the edges of the media does not select, it only
focuses the li.
-------------------------------------------------+-------------------------
 Reporter:  circlecube                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Media                                |  Review
 Severity:  normal                               |     Version:  trunk
 Keywords:  good-first-bug has-patch needs-      |  Resolution:
  testing needs-screenshots                      |     Focuses:  ui,
                                                 |  accessibility
-------------------------------------------------+-------------------------

Comment (by circlecube):

 After some digging I think the best way to resolve this is to update the
 js to match the css. As it's set now, clicking the `li.attachment` will
 give it focus, but only by clicking the `div.attachment-preview` (which is
 contained within the `li`) will select the media. So here's a patch that
 updates the javascript event attached to the media attachments, so
 clicking the `li.attachment` will select it.

 From my testing the keyboard controls all still work, and not I'm not able
 to focus an element without also selecting it. Styling is all the same.
 See Attachment 40578-2.diff (it includes the js file as well as the min.js
 file)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40578#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list