Twenty Fifteen: add spaces after screen reader text strings to make them readable. Props nvwd, pavelevap, afercia. Fixes #30606.
git-svn-id: https://develop.svn.wordpress.org/trunk@30781 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8719a8a8b0
commit
51272ff656
@ -52,7 +52,7 @@ function twentyfifteen_entry_meta() {
|
||||
$format = get_post_format();
|
||||
if ( current_theme_supports( 'post-formats', $format ) ) {
|
||||
printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
|
||||
sprintf( '<span class="screen-reader-text">%s</span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
|
||||
sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
|
||||
esc_url( get_post_format_link( $format ) ),
|
||||
get_post_format_string( $format )
|
||||
);
|
||||
@ -72,7 +72,7 @@ function twentyfifteen_entry_meta() {
|
||||
esc_html( get_the_modified_date() )
|
||||
);
|
||||
|
||||
printf( '<span class="posted-on"><span class="screen-reader-text">%1$s</span><a href="%2$s" rel="bookmark">%3$s</a></span>',
|
||||
printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
|
||||
esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
|
||||
esc_url( get_permalink() ),
|
||||
$time_string
|
||||
@ -81,7 +81,7 @@ function twentyfifteen_entry_meta() {
|
||||
|
||||
if ( 'post' == get_post_type() ) {
|
||||
if ( is_singular() || is_multi_author() ) {
|
||||
printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s</span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
|
||||
printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
|
||||
esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
esc_html( get_the_author() )
|
||||
@ -90,7 +90,7 @@ function twentyfifteen_entry_meta() {
|
||||
|
||||
$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
|
||||
if ( $categories_list && twentyfifteen_categorized_blog() ) {
|
||||
printf( '<span class="cat-links"><span class="screen-reader-text">%1$s</span>%2$s</span>',
|
||||
printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
|
||||
esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
|
||||
$categories_list
|
||||
);
|
||||
@ -98,7 +98,7 @@ function twentyfifteen_entry_meta() {
|
||||
|
||||
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
|
||||
if ( $tags_list ) {
|
||||
printf( '<span class="tags-links"><span class="screen-reader-text">%1$s</span>%2$s</span>',
|
||||
printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
|
||||
esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
|
||||
$tags_list
|
||||
);
|
||||
@ -109,7 +109,7 @@ function twentyfifteen_entry_meta() {
|
||||
// Retrieve attachment metadata.
|
||||
$metadata = wp_get_attachment_metadata();
|
||||
|
||||
printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s × %4$s</a></span>',
|
||||
printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>',
|
||||
esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
|
||||
esc_url( wp_get_attachment_url() ),
|
||||
$metadata['width'],
|
||||
|
@ -30,8 +30,8 @@ get_header(); ?>
|
||||
|
||||
// Previous/next post navigation.
|
||||
the_post_navigation( array(
|
||||
'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
|
||||
'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
|
||||
'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post: </span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
|
||||
'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post: </span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
|
||||
) );
|
||||
|
||||
// End the loop.
|
||||
|
Loading…
Reference in New Issue
Block a user