Make WordPress Core


Ignore:
Timestamp:
06/14/2016 10:45:10 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Themes: Make default "read more" link more accessible.

Add an aria-label with the post title to make it available for screen readers.

Props Kau-Boy.
Fixes #36572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r37674 r37706  
    263263    $post = get_post();
    264264
    265     if ( null === $more_link_text )
    266         $more_link_text = __( '(more…)' );
     265    if ( null === $more_link_text ) {
     266        $more_link_text = sprintf(
     267            '<span aria-label="%1$s">%2$s</span>',
     268            sprintf(
     269                /* translators: %s: Name of current post */
     270                __( 'Continue reading %s' ),
     271                the_title_attribute( array( 'echo' => false ) )
     272            ),
     273            __( '(more&hellip;)' )
     274        );
     275    }
    267276
    268277    $output = '';
Note: See TracChangeset for help on using the changeset viewer.