[wp-trac] [WordPress Trac] #32236: Semantic elements for non-link links: media views buttons

WordPress Trac noreply at wordpress.org
Sat May 2 12:04:31 UTC 2015


#32236: Semantic elements for non-link links: media views buttons
-------------------------------------------+-----------------------------
 Reporter:  afercia                        |      Owner:
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  Media                          |    Version:  3.5
 Severity:  normal                         |   Keywords:
  Focuses:  ui, accessibility, javascript  |
-------------------------------------------+-----------------------------
 All the buttons in the media views (wp.media.view.Button) are currently
 marked up as links with an attribute `href="#"` and they just "look" like
 buttons. For semantics and accessibility they should be buttons, see
 #26504

 Thanks to backbone this would be a two-lines change but we should
 carefully check if anything breaks. Not 100% sure but to my understanding,
 given the way backbone attaches events, we should be safe. cc
 @wonderboymusic

 Also, the modal menu items (wp.media.view.MenuItem) are links with an
 attribute `href="#"`. See screenshot below.

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

 If we decide to keep them as links, then they should act like links and be
 integrated with the media router and browser history. Or, we can simply
 change them in buttons and consider them just as controls that "switch"
 the views. Open to suggestions, any thoughs more than welcome.

 See related #26550 for the buttons in `media-template.php`

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


More information about the wp-trac mailing list