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:
parent
70a27aca29
commit
68ea097c59
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue