mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Twenty Fourteen: improve post thumbnail HTML output.
* Add `aria-hidden` attribute to reduce verbosity on archive pages. * Add alt text in archives to avoid confusing link texts, see #30076 for context in Twenty Fifteen. Props hiwhatsup, joedolson. Fixes #30144. Built from https://develop.svn.wordpress.org/trunk@30387 git-svn-id: http://core.svn.wordpress.org/trunk@30384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a9a3ee7e23
commit
d2b903f896
@ -189,12 +189,12 @@ function twentyfourteen_post_thumbnail() {
|
|||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<a class="post-thumbnail" href="<?php the_permalink(); ?>">
|
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
|
||||||
<?php
|
<?php
|
||||||
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
|
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
|
||||||
the_post_thumbnail( 'twentyfourteen-full-width' );
|
the_post_thumbnail( 'twentyfourteen-full-width' );
|
||||||
} else {
|
} else {
|
||||||
the_post_thumbnail();
|
the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user