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
This commit is contained in:
parent
661f5a477e
commit
2e79b18178
@ -262,8 +262,17 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
|
|||||||
|
|
||||||
$post = get_post();
|
$post = get_post();
|
||||||
|
|
||||||
if ( null === $more_link_text )
|
if ( null === $more_link_text ) {
|
||||||
$more_link_text = __( '(more…)' );
|
$more_link_text = sprintf(
|
||||||
|
'<span aria-label="%1$s">%2$s</span>',
|
||||||
|
sprintf(
|
||||||
|
/* translators: %s: Name of current post */
|
||||||
|
__( 'Continue reading %s' ),
|
||||||
|
the_title_attribute( array( 'echo' => false ) )
|
||||||
|
),
|
||||||
|
__( '(more…)' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
$has_teaser = false;
|
$has_teaser = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user