WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#34481 closed defect (bug) (fixed)

oEmbed "Read more" accessibility

Reported by: GaryJ Owned by: SergeyBiryukov
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords: has-patch
Focuses: accessibility Cc:

Description

See https://make.wordpress.org/core/2015/10/28/new-embeds-feature-in-wordpress-4-4/embed/ as a demo page.

The "Read more" link at the end has no screen reader text for the post title, so if multiple WP-based embeds are added to a webpage (regardless of whether that site runs WP or not), there will be multiple links to different URLs, all with the same link text.

It would be good if this could be fixed in Core before 4.4 is released.

Attachments (4)

34481.diff (1.7 KB) - added by swissspidy 6 years ago.
34481.2.diff (2.2 KB) - added by swissspidy 6 years ago.
34481.2.png (282.4 KB) - added by swissspidy 6 years ago.
Screenshot of 34481.2.diff
34481.3.diff (2.2 KB) - added by swissspidy 6 years ago.
Adds description to wp_embed_excerpt_more() docblock

Download all attachments as: .zip

Change History (12)

This ticket was mentioned in Slack in #accessibility by garyj. View the logs.


6 years ago

#2 @pento
6 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.4

@swissspidy
6 years ago

#3 @swissspidy
6 years ago

  • Keywords has-patch added; needs-patch removed

Thanks for the ticket!

34481.diff solves this the same way some of the default themes do it (Twenty Fourteen, Twenty Thirteen, to name two). The only difference is the displayed text ("Read more" vs. "Continue reading").

#4 follow-up: @SergeyBiryukov
6 years ago

"Continue reading {post name}" sounds more natural to me than "Read more {post name}".

Should we consider changing the label to "Continue reading"?

#5 in reply to: ↑ 4 @GaryJ
6 years ago

Replying to SergeyBiryukov:

"Continue reading {post name}" sounds more natural to me than "Read more {post name}".

Should we consider changing the label to "Continue reading"?

I was just thinking the same. Was trying to see if the core themes had an "about" in there, as in "Read more about Foo".

+1 to "Continue reading {post name}".

@swissspidy
6 years ago

@swissspidy
6 years ago

Screenshot of 34481.2.diff

#6 @swissspidy
6 years ago

34481.2.diff changes the text to "Continue reading (post name)" and updates the docblock as well.

Last edited 6 years ago by swissspidy (previous) (diff)

#7 @GaryJ
6 years ago

Looks good @swissspidy. I'd suggest keeping the original DocBlock Summary, and having your new blurb as the Description. The summary outlines the what, the description dives into the how.

/**
 * Filters the string in the "more" link displayed after a trimmed excerpt.
 *
 * Replaces "[...]" (appended to automatically generated excerpts) with an
 * ellipsis and a Continue reading link in the embed template. 
 * 
 * @since 4.4.0
...
*/

@swissspidy
6 years ago

Adds description to wp_embed_excerpt_more() docblock

#8 @SergeyBiryukov
6 years ago

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

In 35432:

Embeds: Include post name in "Continue reading" links to provide a readable link for screenreaders.

Props swissspidy.
Fixes #34481.

Note: See TracTickets for help on using tickets.