Make WordPress Core

Changeset 58771


Ignore:
Timestamp:
07/20/2024 10:55:14 AM (5 months ago)
Author:
karmatosed
Message:

Multiple themes Fixes theme screen reader including text inside card.

The function twentysixteen_entry_meta included screen reader text inside the span property using the author mf class. This resolves that in both Twenty Sixteen and Twenty Fifteen. It should have the screen reader text inside the byline span but outside the author vcard span.

Props dshanske, laurelfulford, sabernhardt, shilu25.
Fixes #46233.

Location:
trunk/src/wp-content/themes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php

    r55276 r58771  
    9898            if ( is_singular() || is_multi_author() ) {
    9999                printf(
    100                     '<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>',
     100                    '<span class="byline"><span class="screen-reader-text">%1$s </span><span class="author vcard"><a class="url fn n" href="%2$s">%3$s</a></span></span>',
    101101                    /* translators: Hidden accessibility text. */
    102102                    _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
  • trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php

    r55276 r58771  
    2222            $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
    2323            printf(
    24                 '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
     24                '<span class="byline">%1$s<span class="screen-reader-text">%2$s </span><span class="author vcard"><a class="url fn n" href="%3$s">%4$s</a></span></span>',
    2525                get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
    2626                /* translators: Hidden accessibility text. */
Note: See TracChangeset for help on using the changeset viewer.