Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30176 closed enhancement (fixed)

Twenty Fourteen: Replaces ellipses with ellipses and a Continue reading link.

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

Description

To help meet accessibility-ready requirements, we need to make clean automatically-generated excepts. We should replace the ellipses (appended to automatically generated excerpts) with a Continue reading link.

The theme already carries the accessibility-ready tag but this was missed previously.

This would mirror what we already do in the content.php and other content areas, and is catching another use-case:

<?php
    /* translators: %s: Name of current post */
    the_content( sprintf(
        esc_html__( 'Continue reading %s', 'twentyfifteen' ),
            the_title( '<span class="screen-reader-text">', '</span>', false )
        ) );
?>

We could add it in the template-tags.php file and follow this example: http://www.fklein.info/read-more-link-excerpts/

Related: #30135

Attachments (3)

30176.patch (7.8 KB) - added by davidakennedy 10 years ago.
30176.2.patch (7.9 KB) - added by davidakennedy 10 years ago.
Removes leading space; concatenates ellipses with spaces and link.
30176-template-tags-php.diff (1.2 KB) - added by lancewillett 10 years ago.
Better twentyfourteen_excerpt_more function doc block

Download all attachments as: .zip

Change History (12)

#1 @davidakennedy
10 years ago

  • Keywords has-patch needs-testing added

#2 @davidakennedy
10 years ago

Note: I neglected to mention that the patch also modifies the content template parts to include a visually hidden post title for screen reader users.

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


10 years ago

#4 @lancewillett
10 years ago

  • Milestone changed from Awaiting Review to 4.1

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


10 years ago

@davidakennedy
10 years ago

Removes leading space; concatenates ellipses with spaces and link.

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


10 years ago

#7 @michaelbeil
10 years ago

  • Keywords needs-testing removed

can verify that this patch is working.

#8 @lancewillett
10 years ago

  • Keywords commit added

@lancewillett
10 years ago

Better twentyfourteen_excerpt_more function doc block

#9 @lancewillett
10 years ago

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

In 30389:

Twenty Fourteen: replace ellipses appended to automatically generated excerpts with both ellipses and a "Continue Reading" link to meet accessibility-ready requirements.

Props davidakennedy, lancewillett. Fixes #30176.

Note: See TracTickets for help on using tickets.