WordPress.org

Make WordPress Core

Changeset 36584


Ignore:
Timestamp:
02/19/16 15:09:51 (21 months ago)
Author:
afercia
Message:

Accessibility: after [36000] conditionally print out the aria-describedby attribute on the Featured Image postbox.

Fixes #35076.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r36543 r36584  
    13811381    $post               = get_post( $post ); 
    13821382    $post_type_object   = get_post_type_object( $post->post_type ); 
    1383     $set_thumbnail_link = '<p class="hide-if-no-js"><a href="%s" id="set-post-thumbnail" aria-describedby="set-post-thumbnail-desc" class="thickbox">%s</a></p>'; 
     1383    $set_thumbnail_link = '<p class="hide-if-no-js"><a href="%s" id="set-post-thumbnail"%s class="thickbox">%s</a></p>'; 
    13841384    $upload_iframe_src  = get_upload_iframe_src( 'image', $post->ID ); 
    13851385 
    13861386    $content = sprintf( $set_thumbnail_link, 
    13871387        esc_url( $upload_iframe_src ), 
     1388        '', // Empty when there's no featured image set, `aria-describedby` attribute otherwise. 
    13881389        esc_html( $post_type_object->labels->set_featured_image ) 
    13891390    ); 
     
    14171418            $content = sprintf( $set_thumbnail_link, 
    14181419                esc_url( $upload_iframe_src ), 
     1420                ' aria-describedby="set-post-thumbnail-desc"', 
    14191421                $thumbnail_html 
    14201422            ); 
Note: See TracChangeset for help on using the changeset viewer.