[wp-trac] [WordPress Trac] #39305: Media: make the inline uploader button a real button

WordPress Trac noreply at wordpress.org
Fri Dec 16 09:22:07 UTC 2016


#39305: Media: make the inline uploader button a real button
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |      Owner:
     Type:  defect (bug)             |     Status:  new
 Priority:  normal                   |  Milestone:  4.8
Component:  Media                    |    Version:
 Severity:  normal                   |   Keywords:  has-screenshots needs-
  Focuses:  accessibility,           |  patch
  javascript                         |
-------------------------------------+-------------------------------------
 In [32467] the inline uploader button in the media template was changed in
 a real `<button>` element for better accessibility and semantics. By the
 way, `wp.media.view.UploaderWindow` still
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/media/views/uploader/window.js?rev=33337#L20 creates and
 appends to the body a link] that, after
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/js/media/views/uploader/inline.js?rev=33337&marks=112,113,114#L100
 some replacements] that happen in `wp.media.view.UploaderInline`, is then
 used in the uploader.

 Basically, the "Select Files" control is still a link, thus defeating the
 purpose of [32467]:

 [[Image(https://cldup.com/2T5AqAdlTk.png)]]

 Since non-link links should be buttons (see #26504 and
 [https://core.trac.wordpress.org/query?summary=~non-link+links the related
 tickets]), this should be changed in a `<button>` element.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39305>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list