Making WordPress.org

Ticket #5985: 5985.diff

File 5985.diff, 1.1 KB (added by alexstine, 3 years ago)

Adds aria-label and empty alt.

  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-photos/template-parts/photo-single.php

     
    5656
    5757        <div class="entry-content">
    5858                <figure>
    59                         <a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>">
    60                                 <img class="single-photo" src="<?php echo get_the_post_thumbnail_url( get_the_ID(), 'medium'); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_post_thumbnail_id() ) ); ?>">
     59                        <a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" aria-label="<?php esc_attr_e( 'View Larger Photo', 'wporg-photos' ); ?>">
     60                                <img class="single-photo" src="<?php echo get_the_post_thumbnail_url( get_the_ID(), 'medium'); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_post_thumbnail_id() ) ); ?>" alt="">
    6161                        </a>
    6262
    6363                        <?php