Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#32236 closed defect (bug) (fixed)

Semantic elements for non-link links: media views buttons

Reported by: afercia's profile afercia Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch semantic-buttons
Focuses: ui, accessibility, javascript Cc:


All the buttons in the media views ( 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 ( are links with an attribute href="#". See screenshot below.

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

Attachments (1)

32236.patch (983 bytes) - added by afercia 8 years ago.

Download all attachments as: .zip

Change History (6)

8 years ago

#1 @afercia
8 years ago

  • Keywords has-patch added

First pass patch.

#2 @wonderboymusic
8 years ago

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

This appears to work fine. Will drop it in and see what breaks.

#3 @wonderboymusic
8 years ago

In 32464: should create <button>s, not <a href="#">s.

Props afercia.
See #32236.

#4 @wonderboymusic
8 years ago

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

Fixed, the rest of the work is in #26550

#5 @afercia
6 years ago

  • Keywords semantic-buttons added
Note: See TracTickets for help on using tickets.