WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#25102 closed defect (bug) (fixed)

Input labels on the Add Media panel are not accessible

Reported by: johnbillion Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords: has-patch
Focuses: accessibility Cc:

Description

Splitting this out from #23561

The search box in the Add Media panel does not have an associated label so screen reader users receive no feedback as to the purpose of this text box.

Additionally, (not mentioned in #23561) the select menu for filtering media items does not have a label either and should do so.

Attachments (1)

25102.patch (1.2 KB) - added by SergeyBiryukov 5 years ago.

Download all attachments as: .zip

Change History (11)

#1 @r0uter
6 years ago

  • Cc 01tonythomas@… added

#2 @joedolson
5 years ago

To save somebody else a little trouble, these fields are created in /wp-includes/js/media-views.js, between lines 3083 and 3171. media.view.AttachmentFilters and media.view.Search.

As of yet, I haven't pinned down exactly how the model for the HTML is sourced; I don't know the architecture of the media editor very well, and my minimal JS isn't serving me very well on this.

This seems like it should be a very simple task to complete, if somebody can find exactly where it should be done...

#3 @joedolson
5 years ago

  • Cc design@… added

#4 follow-up: @r0uter
5 years ago

I would like to prepare a patch for this bug. Please assign it to me.

#5 in reply to: ↑ 4 @grahamarmfield
5 years ago

Replying to r0uter:

I would like to prepare a patch for this bug. Please assign it to me.

Please feel free to add a patch - that would be great. I'll test it when it's done.

#6 @nacin
5 years ago

  • Component changed from Accessibility to Media
  • Focuses accessibility added

#7 @ericlewis
5 years ago

  • Keywords good-first-bug added

#8 @ericlewis
5 years ago

  • Summary changed from Input labels on the Add Media panel to Input labels on the Add Media panel are not accessible

#9 @SergeyBiryukov
5 years ago

  • Keywords has-patch added; needs-patch good-first-bug removed
  • Milestone changed from Awaiting Review to 4.0

Sorry, didn't notice the 'good-first-bug' tag while looking into this.

I'm not very familiar with the media frame code, but 25102.patch seems to work for me. Inspired by a similar solution for the search input on Themes screen: tags/3.9.1/src/wp-admin/js/theme.js#L89.

Last edited 5 years ago by SergeyBiryukov (previous) (diff)

#10 @wonderboymusic
5 years ago

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

In 28839:

Dynamically prepend screen reader text to the attachment filters dropdown and the search box in the media modal.

Props SergeyBiryukov.
Fixes #25102.

Note: See TracTickets for help on using tickets.