WordPress.org

Make WordPress Core

Changeset 30231


Ignore:
Timestamp:
11/04/2014 06:56:10 PM (6 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: accessible alt text for post thumbnail links.

Props joedolson, fixes #30076.

File:
1 edited

Legend:

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

    r30216 r30231  
    194194    <?php else : ?>
    195195
    196     <a class="post-thumbnail" href="<?php the_permalink(); ?>">
    197         <?php the_post_thumbnail(); ?>
     196    <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true">
     197        <?php
     198            the_post_thumbnail( 'post-thumbnail', array( 'alt'=>get_the_title() ) );
     199        ?>
    198200    </a>
    199201
Note: See TracChangeset for help on using the changeset viewer.