Media: After [42693], update HTML4 markup in img_caption_shortcode() to avoid an empty ID attribute as well.

Add a unit test for `aria-describedby` in `img_caption_shortcode()`.

See #34595.
Built from https://develop.svn.wordpress.org/trunk@42694


git-svn-id: http://core.svn.wordpress.org/trunk@42522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-02-11 15:40:30 +00:00
parent 0f2b559d05
commit beeafbc7ec
2 changed files with 2 additions and 2 deletions

View File

@ -1623,7 +1623,7 @@ function img_caption_shortcode( $attr, $content = null ) {
esc_attr( $class ),
str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
sprintf(
'<p id="%s" class="wp-caption-text">%s</p>',
'<p %sclass="wp-caption-text">%s</p>',
$atts['caption_id'],
$atts['caption']
)

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42693';
$wp_version = '5.0-alpha-42694';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.