From 2e79b18178dccf1e32836f37d02ae710e9064392 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Jun 2016 22:45:10 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@37706 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-template.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 2bfa6b6098..6ddc4b34ed 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -262,8 +262,17 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) { $post = get_post(); - if ( null === $more_link_text ) - $more_link_text = __( '(more…)' ); + if ( null === $more_link_text ) { + $more_link_text = sprintf( + '%2$s', + sprintf( + /* translators: %s: Name of current post */ + __( 'Continue reading %s' ), + the_title_attribute( array( 'echo' => false ) ) + ), + __( '(more…)' ) + ); + } $output = ''; $has_teaser = false;