Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36554 closed defect (bug) (fixed)

Replace div with button so media attachment modal can be closed with keyboard

Reported by: joedolson's profile joedolson Owned by: afercia's profile afercia
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: accessibility Cc:

Description

The modal for attaching a media item to a post uses a <div> for a close element. Switches to a button.

Probably should also add some focus management into media.js so that focus lands in an appropriate place; not handled in this patch.

Attachments (2)

36554.patch (658 bytes) - added by joedolson 8 years ago.
Switch from div to button
36554.2.patch (1.5 KB) - added by afercia 8 years ago.

Download all attachments as: .zip

Change History (5)

@joedolson
8 years ago

Switch from div to button

#1 @afercia
8 years ago

  • Milestone changed from Awaiting Review to 4.6
  • Owner set to afercia
  • Status changed from new to assigned

@afercia
8 years ago

#2 @afercia
8 years ago

Yep this modal dialog needs a complete accessibility treatment, as done for example for the "advanced" editor link modal. In the meanwhile this is good to go. Changed just one thing: wouldn't recommend to use the CSS class button-link here because it's going to be modified and have an underline and other new things in #35126.

#3 @afercia
8 years ago

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

In 37231:

Accessibility: change the close "X" in the Media "Attach to existing content" modal in a button.

Props joedolson.

Fixes #36554.

Note: See TracTickets for help on using tickets.