Make WordPress Core

Ticket #30606: 30606.patch

File 30606.patch, 4.2 KB (added by nvwd, 10 years ago)

added necessary spaces to screen reader text

  • inc/template-tags.php

     
    5252        $format = get_post_format();
    5353        if ( current_theme_supports( 'post-formats', $format ) ) {
    5454                printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
    55                         sprintf( '<span class="screen-reader-text">%s</span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
     55                        sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
    5656                        esc_url( get_post_format_link( $format ) ),
    5757                        get_post_format_string( $format )
    5858                );
     
    7272                        esc_html( get_the_modified_date() )
    7373                );
    7474
    75                 printf( '<span class="posted-on"><span class="screen-reader-text">%1$s</span><a href="%2$s" rel="bookmark">%3$s</a></span>',
     75                printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
    7676                        esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
    7777                        esc_url( get_permalink() ),
    7878                        $time_string
     
    8181
    8282        if ( 'post' == get_post_type() ) {
    8383                if ( is_singular() || is_multi_author() ) {
    84                         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>',
     84                        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>',
    8585                                esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
    8686                                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    8787                                esc_html( get_the_author() )
     
    9090
    9191                $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
    9292                if ( $categories_list && twentyfifteen_categorized_blog() ) {
    93                         printf( '<span class="cat-links"><span class="screen-reader-text">%1$s</span>%2$s</span>',
     93                        printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    9494                                esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
    9595                                $categories_list
    9696                        );
     
    9898
    9999                $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
    100100                if ( $tags_list ) {
    101                         printf( '<span class="tags-links"><span class="screen-reader-text">%1$s</span>%2$s</span>',
     101                        printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    102102                                esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
    103103                                $tags_list
    104104                        );
     
    109109                // Retrieve attachment metadata.
    110110                $metadata = wp_get_attachment_metadata();
    111111
    112                 printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s &times; %4$s</a></span>',
     112                printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
    113113                        esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
    114114                        esc_url( wp_get_attachment_url() ),
    115115                        $metadata['width'],
  • single.php

     
    3030
    3131                        // Previous/next post navigation.
    3232                        the_post_navigation( array(
    33                                 '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' ),
    34                                 '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' )
     33                                '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' ),
     34                                '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' )
    3535                        ) );
    3636
    3737                // End the loop.