From 3fb8eee9fca035d4f25474928b73574baf91b896 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Sun, 14 Jan 2018 16:39: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. Built from https://develop.svn.wordpress.org/trunk@42444 git-svn-id: http://core.svn.wordpress.org/trunk@42274 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media-template.php | 65 +++++++++++++++++----------------- wp-includes/version.php | 2 +- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index 1fa77282bc..4f2f302e0e 100644 --- a/wp-includes/media-template.php +++ b/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() { -