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.

git-svn-id: https://develop.svn.wordpress.org/trunk@30387 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2014-11-19 18:11:39 +00:00
parent 70a27aca29
commit 68ea097c59
1 changed files with 2 additions and 2 deletions

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>