[wp-trac] [WordPress Trac] #37188: Add New Media button does not give aria feedback

WordPress Trac noreply at wordpress.org
Fri Jan 20 19:26:47 UTC 2017

#37188: Add New Media button does not give aria feedback
 Reporter:  mantismamita                         |       Owner:  afercia
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.8
Component:  Media                                |     Version:  4.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-ui-feedback has-screenshots      |     Focuses:  ui,
  has-patch                                      |  accessibility

Comment (by adamsilverstein):

 Replying to [comment:9 afercia]:
 > [attachment:37188.2.diff] uses a new approach and stores the Add New
 button as a property of the frame. Not sure
 includes/js/media/views/frame/manage.js?rev=37722#L42 why this event was
 delegated], since the `.page-title-action` element is always printed out
 in the page.

 The only reason I could think this would be delegated is if the button
 could sometimes be added or the event was needed after the script ran, but
 I don't see that happening here.

 I tested the patch and this looks good; everything worked well in the
 media library, however when I tried reaching click "Add Media" or "Set
 Featured Image" on the post edit page, I got a JavaScript error:
 `Uncaught TypeError: Cannot read property 'attr' of undefined` likely
 because there isn't a `.page-title-action` element on the page.

Ticket URL: <https://core.trac.wordpress.org/ticket/37188#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list