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:
Lance Willett 2014-11-19 18:12:21 +00:00
parent a9a3ee7e23
commit d2b903f896

View File

@ -189,12 +189,12 @@ function twentyfourteen_post_thumbnail() {
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>">
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
<?php
if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
the_post_thumbnail( 'twentyfourteen-full-width' );
} else {
the_post_thumbnail();
the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
}
?>
</a>