Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#32969 closed defect (bug) (fixed)

the Add Media button should be a button

Reported by: afercia's profile afercia Owned by: iseulde's profile iseulde
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: accessibility, javascript Cc:

Description

Currently, the Add Media button is a non-link link (with a href="#" attribute) and has a title attribute that repeats the link text:

https://cldup.com/8edC4_CNIR.png

For accessibility and semantics should be a button element. The current title attribute is redundant and doesn't add any useful information, should be removed. Worth noting when using ChromeVox it's impossible to open the media modal using the keyboard, whatever you try: pressing Enter or pressing Spacebar does nothing. While this has to do with some specific ChromeVox quirks with URL fragment links, events and preventing the default action, using a button instead of a link would fix it.

Attachments (1)

32969.patch (684 bytes) - added by afercia 10 years ago.

Download all attachments as: .zip

Change History (6)

@afercia
10 years ago

#1 @afercia
10 years ago

  • Keywords has-patch added

In the proposed patch:

  • make the Add Media button a button and remove its redundant title attribute

#2 @iseulde
10 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Version 4.2 deleted

Looking good.

This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.


10 years ago

#4 @iseulde
10 years ago

  • Owner set to iseulde
  • Resolution set to fixed
  • Status changed from new to closed

In 33298:

Editor: Add Media should be a button

Props afercia.
Fixes #32969.

#5 @iseulde
10 years ago

  • Milestone changed from Future Release to 4.3
Note: See TracTickets for help on using tickets.