Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31095 closed defect (bug) (fixed)

Fill in support for screen-reader-text class

Reported by: obenland's profile obenland Owned by: lancewillett's profile lancewillett
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: accessibility Cc:

Description

Twenty Eleven and Twenty Twelve use custom classes for elements that are meant for screen readers only.

Six years ago, r11312 introduced .screen-reader-text as a canonical class name for text targeted to screen readers for all of core. Not only for wp-admin, but also for the front-end through get_search_form().

We should add this class name for forward compatibility with features using this class, but also to make sure that child theme adding theme support for HTML5 features are not caught off guard, when the existing styles for assistive text doesn't apply.

This will also provide a great teaching opportunity for us, encouraging theme authors to add styles for that class in themes that don't have it already. We could do that both at the time this change goes in, and when 4.2 gets released.

This is a spin-off from discussions in #29699.

Attachments (1)

31095.diff (1.3 KB) - added by obenland 10 years ago.

Download all attachments as: .zip

Change History (3)

@obenland
10 years ago

This ticket was mentioned in Slack in #core-themes by obenland. View the logs.


10 years ago

#2 @lancewillett
10 years ago

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

In 31268:

Twenty Eleven and Twelve: fill in support for screen-reader-text class.

Props obenland, fixes #31095.

Note: See TracTickets for help on using tickets.