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:
parent
0f2b559d05
commit
beeafbc7ec
|
@ -1623,7 +1623,7 @@ function img_caption_shortcode( $attr, $content = null ) {
|
||||||
esc_attr( $class ),
|
esc_attr( $class ),
|
||||||
str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
|
str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
|
||||||
sprintf(
|
sprintf(
|
||||||
'<p id="%s" class="wp-caption-text">%s</p>',
|
'<p %sclass="wp-caption-text">%s</p>',
|
||||||
$atts['caption_id'],
|
$atts['caption_id'],
|
||||||
$atts['caption']
|
$atts['caption']
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue