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.

Built from https://develop.svn.wordpress.org/trunk@58771


git-svn-id: http://core.svn.wordpress.org/trunk@58173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Tammie Lister 2024-07-20 10:57:14 +00:00
parent d5f4f876fb
commit a75e8ef744
3 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,7 @@ if ( ! function_exists( '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>',
'<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>',
/* translators: Hidden accessibility text. */
_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),

View File

@ -21,7 +21,7 @@ if ( ! function_exists( 'twentysixteen_entry_meta' ) ) :
if ( 'post' === get_post_type() ) {
$author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
printf(
'<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>',
'<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>',
get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
/* translators: Hidden accessibility text. */
_x( 'Author', 'Used before post author name.', 'twentysixteen' ),

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58770';
$wp_version = '6.7-alpha-58771';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.