From ae0995660cafb561d1055ace364ceba899f883f6 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Sun, 14 Jan 2018 16:38:47 +0000 Subject: [PATCH] Accessibility: Media: Improve the usage of a few label elements in the media templates. Label elements should only be used for labelable elements. - `Uploaded By` and `Uploaded To` aren't form controls and shouldn't be associated with labels - changes the labels for media source, alternate sources, poster image, and tracks to solve a layout issue and explicitly associate the labels to their form fields (previously, the labels were wrapping also the Remove buttons) Props Presskopp, afercia. Fixes #38759, #40468. git-svn-id: https://develop.svn.wordpress.org/trunk@42444 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media-template.php | 65 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 1fa77282bc..4f2f302e0e 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -75,7 +75,7 @@ function wp_underscore_video_template() { h = Math.ceil( ( data.model.height * w ) / data.model.width ); } else { h = data.model.height; - } + } if ( w ) { w_rule = 'width: ' + w + 'px; '; @@ -120,7 +120,7 @@ function wp_underscore_video_template() { - if ( ! _.isUndefined( data.model. ) && data.model. ) { + if ( ! _.isUndefined( data.model. ) && data.model. ) { #> <# } #> @@ -434,19 +434,19 @@ function wp_print_media_templates() { -