Make WordPress Core

Changeset 30387


Ignore:
Timestamp:
11/19/2014 06:11:39 PM (10 years ago)
Author:
lancewillett
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r29169 r30387  
    190190    <?php else : ?>
    191191
    192     <a class="post-thumbnail" href="<?php the_permalink(); ?>">
     192    <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
    193193    <?php
    194194        if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) ) {
    195195            the_post_thumbnail( 'twentyfourteen-full-width' );
    196196        } else {
    197             the_post_thumbnail();
     197            the_post_thumbnail( 'post-thumbnail', array( 'alt' => get_the_title() ) );
    198198        }
    199199    ?>
Note: See TracChangeset for help on using the changeset viewer.