From e491b2bc6abb50b0fba26b33c77fd4a62ccf5dfb Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 26 Oct 2018 07:41:45 +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) Merges [42444] to the 5.0 branch. Props Presskopp, afercia. Fixes #38759, #40468. Built from https://develop.svn.wordpress.org/branches/5.0@43829 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43658 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media-template.php | 67 +++++++++++++++++----------------- wp-includes/version.php | 2 +- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index c45f3f00a7..190f9044d3 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -69,7 +69,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; '; @@ -103,8 +103,8 @@ function wp_underscore_video_template() { endforeach; ?><# if ( ! _.isUndefined( data.model. ) && data.model. ) { - #> <# + ?> if ( ! _.isUndefined( data.model. ) && data.model. ) { + #> <# } #> > @@ -408,19 +408,19 @@ function wp_print_media_templates() { -