diff --git a/wp-includes/version.php b/wp-includes/version.php index 6fcd679319..aaf34fac7a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49176'; +$wp_version = '5.6-alpha-49177'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-tag-cloud.php b/wp-includes/widgets/class-wp-widget-tag-cloud.php index c23cda21f1..8b5c4a80b9 100644 --- a/wp-includes/widgets/class-wp-widget-tag-cloud.php +++ b/wp-includes/widgets/class-wp-widget-tag-cloud.php @@ -90,11 +90,28 @@ class WP_Widget_Tag_Cloud extends WP_Widget { echo $args['before_title'] . $title . $args['after_title']; } + $format = current_theme_supports( 'html5', 'navigation-widgets' ) ? 'html5' : 'xhtml'; + + /** This filter is documented in wp-includes/widgets/class-wp-nav-menu-widget.php */ + $format = apply_filters( 'navigation_widgets_format', $format ); + + if ( 'html5' === $format ) { + // The title may be filtered: Strip out HTML and make sure the aria-label is never empty. + $title = trim( strip_tags( $title ) ); + $aria_label = $title ? $title : $default_title; + echo ''; + } + echo $args['after_widget']; }