mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Accessibility: after [36000] conditionally print out the aria-describedby
attribute on the Featured Image postbox.
Fixes #35076. Built from https://develop.svn.wordpress.org/trunk@36584 git-svn-id: http://core.svn.wordpress.org/trunk@36551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
34010353cc
commit
08510d2e5d
@ -1380,11 +1380,12 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
|
||||
|
||||
$post = get_post( $post );
|
||||
$post_type_object = get_post_type_object( $post->post_type );
|
||||
$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>';
|
||||
$set_thumbnail_link = '<p class="hide-if-no-js"><a href="%s" id="set-post-thumbnail"%s class="thickbox">%s</a></p>';
|
||||
$upload_iframe_src = get_upload_iframe_src( 'image', $post->ID );
|
||||
|
||||
$content = sprintf( $set_thumbnail_link,
|
||||
esc_url( $upload_iframe_src ),
|
||||
'', // Empty when there's no featured image set, `aria-describedby` attribute otherwise.
|
||||
esc_html( $post_type_object->labels->set_featured_image )
|
||||
);
|
||||
|
||||
@ -1416,6 +1417,7 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
|
||||
$ajax_nonce = wp_create_nonce( 'set_post_thumbnail-' . $post->ID );
|
||||
$content = sprintf( $set_thumbnail_link,
|
||||
esc_url( $upload_iframe_src ),
|
||||
' aria-describedby="set-post-thumbnail-desc"',
|
||||
$thumbnail_html
|
||||
);
|
||||
$content .= '<p class="hide-if-no-js howto" id="set-post-thumbnail-desc">' . __( 'Click the image to edit or update' ) . '</p>';
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36583';
|
||||
$wp_version = '4.5-alpha-36584';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user