<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[41740] trunk/src: Customize: Improve accessibility of markup for base `WP_Customize_Control` and `WP_Customize_Nav_Menu_Control` with proper use of `label` elements and inclusion of `aria-describedby`.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/41740">41740</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/41740","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>westonruter</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2017-10-04 18:11:08 +0000 (Wed, 04 Oct 2017)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Customize: Improve accessibility of markup for base `WP_Customize_Control` and `WP_Customize_Nav_Menu_Control` with proper use of `label` elements and inclusion of `aria-describedby`.

See <a href="https://core.trac.wordpress.org/ticket/33085">#33085</a>.
Props valendesigns, afercia, westonruter.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscustomizecontrolscss">trunk/src/wp-admin/css/customize-controls.css</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizecontrolphp">trunk/src/wp-includes/class-wp-customize-control.php</a></li>
<li><a href="#trunksrcwpincludescustomizeclasswpcustomizenavmenucontrolphp">trunk/src/wp-includes/customize/class-wp-customize-nav-menu-control.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscustomizecontrolscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/customize-controls.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/customize-controls.css     2017-10-04 16:48:50 UTC (rev 41739)
+++ trunk/src/wp-admin/css/customize-controls.css       2017-10-04 18:11:08 UTC (rev 41740)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -929,9 +929,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        line-height: 28px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-radio label,
-.customize-control-checkbox label,
-.customize-control-nav_menu_auto_add label {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control .customize-inside-control-row {
</ins><span class="cx" style="display: block; padding: 0 10px">         line-height: 20px;
</span><span class="cx" style="display: block; padding: 0 10px">        display: block;
</span><span class="cx" style="display: block; padding: 0 10px">        margin-left: 24px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2670,9 +2668,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                display: inline;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        .customize-control-radio label,
-       .customize-control-checkbox label,
-       .customize-control-nav_menu_auto_add label {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .customize-control-radio .customize-inside-control-row,
+       .customize-control-checkbox .customize-inside-control-row,
+       .customize-control-nav_menu_auto_add .customize-inside-control-row {
</ins><span class="cx" style="display: block; padding: 0 10px">                 margin-left: 32px;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizecontrolphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-control.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-control.php      2017-10-04 16:48:50 UTC (rev 41739)
+++ trunk/src/wp-includes/class-wp-customize-control.php        2017-10-04 18:11:08 UTC (rev 41740)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -477,84 +477,105 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 3.4.0
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function render_content() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                switch( $this->type ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $input_id = '_customize-input-' . $this->id;
+               $description_id = '_customize-description-' . $this->id;
+               $describedby_attr = ( ! empty( $this->description ) ) ? 'aria-describedby="' . esc_attr( $description_id ) . '"' : '';
+               switch ( $this->type ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         case 'checkbox':
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label>
-                                       <input type="checkbox" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); checked( $this->value() ); ?> />
-                                       <?php echo esc_html( $this->label ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <span class="customize-inside-control-row">
+                                       <input
+                                               id="<?php echo esc_attr( $input_id ); ?>"
+                                               <?php echo $describedby_attr; ?>
+                                               type="checkbox"
+                                               value="<?php echo esc_attr( $this->value() ); ?>"
+                                               <?php $this->link(); ?>
+                                               <?php checked( $this->value() ); ?>
+                                       />
+                                       <label for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $this->label ); ?></label>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php if ( ! empty( $this->description ) ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                <span class="description customize-control-description"><?php echo $this->description; ?></span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         </span>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                break;
</span><span class="cx" style="display: block; padding: 0 10px">                        case 'radio':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                if ( empty( $this->choices ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( empty( $this->choices ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         return;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                $name = '_customize-radio-' . $this->id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-                               if ( ! empty( $this->label ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         ?>
+                               <?php if ( ! empty( $this->label ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <?php endif;
-                               if ( ! empty( $this->description ) ) : ?>
-                                       <span class="description customize-control-description"><?php echo $this->description ; ?></span>
-                               <?php endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php endif; ?>
+                               <?php if ( ! empty( $this->description ) ) : ?>
+                                       <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description ; ?></span>
+                               <?php endif; ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                foreach ( $this->choices as $value => $label ) :
-                                       ?>
-                                       <label>
-                                               <input type="radio" value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $value ); ?> />
-                                               <?php echo esc_html( $label ); ?><br/>
-                                       </label>
-                                       <?php
-                               endforeach;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php foreach ( $this->choices as $value => $label ) : ?>
+                                       <span class="customize-inside-control-row">
+                                               <input
+                                                       id="<?php echo esc_attr( $input_id . '-radio-' . $value ); ?>"
+                                                       type="radio" <?php echo $describedby_attr; ?>
+                                                       value="<?php echo esc_attr( $value ); ?>"
+                                                       name="<?php echo esc_attr( $name ); ?>"
+                                                       <?php $this->link(); ?>
+                                                       <?php checked( $this->value(), $value ); ?>
+                                                       />
+                                               <label for="<?php echo esc_attr( $input_id . '-radio-' . $value ); ?>"><?php echo esc_html( $label ); ?></label>
+                                       </span>
+                               <?php endforeach; ?>
+                               <?php
</ins><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px">                        case 'select':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                if ( empty( $this->choices ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( empty( $this->choices ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         return;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label>
-                                       <?php if ( ! empty( $this->label ) ) : ?>
-                                               <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
-                                       <?php endif;
-                                       if ( ! empty( $this->description ) ) : ?>
-                                               <span class="description customize-control-description"><?php echo $this->description; ?></span>
-                                       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php if ( ! empty( $this->label ) ) : ?>
+                                       <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
+                               <?php endif; ?>
+                               <?php if ( ! empty( $this->description ) ) : ?>
+                                       <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
+                               <?php endif; ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <select <?php $this->link(); ?>>
-                                               <?php
-                                               foreach ( $this->choices as $value => $label )
-                                                       echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
-                                               ?>
-                                       </select>
-                               </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <select id="<?php echo esc_attr( $input_id ); ?>" <?php echo $describedby_attr; ?> <?php $this->link(); ?>>
+                                       <?php
+                                       foreach ( $this->choices as $value => $label ) {
+                                               echo '<option value="' . esc_attr( $value ) . '"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';
+                                       }
+                                       ?>
+                               </select>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                break;
</span><span class="cx" style="display: block; padding: 0 10px">                        case 'textarea':
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label>
-                                       <?php if ( ! empty( $this->label ) ) : ?>
-                                               <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
-                                       <?php endif;
-                                       if ( ! empty( $this->description ) ) : ?>
-                                               <span class="description customize-control-description"><?php echo $this->description; ?></span>
-                                       <?php endif; ?>
-                                       <textarea rows="5" <?php $this->input_attrs(); ?> <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
-                               </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php if ( ! empty( $this->label ) ) : ?>
+                                       <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
+                               <?php endif; ?>
+                               <?php if ( ! empty( $this->description ) ) : ?>
+                                       <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
+                               <?php endif; ?>
+                               <textarea
+                                       id="<?php echo esc_attr( $input_id ); ?>"
+                                       rows="5"
+                                       <?php echo $describedby_attr; ?>
+                                       <?php $this->input_attrs(); ?>
+                                       <?php $this->link(); ?>>
+                                       <?php echo esc_textarea( $this->value() ); ?>
+                               </textarea>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                break;
</span><span class="cx" style="display: block; padding: 0 10px">                        case 'dropdown-pages':
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label>
</del><span class="cx" style="display: block; padding: 0 10px">                                 <?php if ( ! empty( $this->label ) ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
-                               <?php endif;
-                               if ( ! empty( $this->description ) ) : ?>
-                                       <span class="description customize-control-description"><?php echo $this->description; ?></span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php endif; ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                <?php if ( ! empty( $this->description ) ) : ?>
+                                       <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
+                               <?php endif; ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                $dropdown_name = '_customize-dropdown-pages-' . $this->id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -576,7 +597,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                // Hackily add in the data link parameter.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $dropdown = str_replace( '<select', '<select ' . $this->get_link() . ' id="' . esc_attr( $input_id ) . '" ' . $describedby_attr, $dropdown );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                // Even more hacikly add auto-draft page stubs.
</span><span class="cx" style="display: block; padding: 0 10px">                                // @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call. See <https://github.com/xwp/wp-customize-posts/pull/250>.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -596,30 +617,37 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                echo $dropdown;
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                </label>
</del><span class="cx" style="display: block; padding: 0 10px">                                 <?php if ( $this->allow_addition && current_user_can( 'publish_pages' ) && current_user_can( 'edit_theme_options' ) ) : // Currently tied to menus functionality. ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        <button type="button" class="button-link add-new-toggle"><?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <button type="button" class="button-link add-new-toggle">
+                                               <?php
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 /* translators: %s: add new page label */
</span><span class="cx" style="display: block; padding: 0 10px">                                                printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        ?></button>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         ?>
+                                       </button>
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <div class="new-content-item">
</span><span class="cx" style="display: block; padding: 0 10px">                                                <label for="create-input-<?php echo $this->id; ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label>
</span><span class="cx" style="display: block; padding: 0 10px">                                                <input type="text" id="create-input-<?php echo $this->id; ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title&hellip;' ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px">                                                <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
</span><span class="cx" style="display: block; padding: 0 10px">                                        </div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <?php endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php endif; ?>
+                               <?php
</ins><span class="cx" style="display: block; padding: 0 10px">                                 break;
</span><span class="cx" style="display: block; padding: 0 10px">                        default:
</span><span class="cx" style="display: block; padding: 0 10px">                                ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label>
-                                       <?php if ( ! empty( $this->label ) ) : ?>
-                                               <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
-                                       <?php endif;
-                                       if ( ! empty( $this->description ) ) : ?>
-                                               <span class="description customize-control-description"><?php echo $this->description; ?></span>
-                                       <?php endif; ?>
-                                       <input type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> />
-                               </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php if ( ! empty( $this->label ) ) : ?>
+                                       <label for="<?php echo esc_attr( $input_id ); ?>" class="customize-control-title"><?php echo esc_html( $this->label ); ?></label>
+                               <?php endif; ?>
+                               <?php if ( ! empty( $this->description ) ) : ?>
+                                       <span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
+                               <?php endif; ?>
+                               <input
+                                       id="<?php echo esc_attr( $input_id ); ?>"
+                                       type="<?php echo esc_attr( $this->type ); ?>"
+                                       <?php echo $describedby_attr; ?>
+                                       <?php $this->input_attrs(); ?>
+                                       value="<?php echo esc_attr( $this->value() ); ?>"
+                                       <?php $this->link(); ?>
+                                       />
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                break;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span></span></pre></div>
<a id="trunksrcwpincludescustomizeclasswpcustomizenavmenucontrolphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/customize/class-wp-customize-nav-menu-control.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/customize/class-wp-customize-nav-menu-control.php   2017-10-04 16:48:50 UTC (rev 41739)
+++ trunk/src/wp-includes/customize/class-wp-customize-nav-menu-control.php     2017-10-04 18:11:08 UTC (rev 41740)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,6 +44,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function content_template() {
</span><span class="cx" style="display: block; padding: 0 10px">                ?>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                <# var elementId; #>
</ins><span class="cx" style="display: block; padding: 0 10px">                 <button type="button" class="button add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php _e( 'Add Items' ); ?>
</span><span class="cx" style="display: block; padding: 0 10px">                </button>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -64,21 +65,25 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        </li>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php foreach ( get_registered_nav_menus() as $location => $description ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <li class="customize-control customize-control-checkbox assigned-menu-location">
-                               <label>
-                                       <input type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" /> <?php echo $description; ?>
-                                       <span class="theme-location-set"><?php
-                                               /* translators: %s: menu name */
-                                               printf( _x( '(Current: %s)', 'menu location' ),
-                                                       '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
-                                               );
-                                       ?></span>
-                               </label>
-                       </li>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <# elementId = _.uniqueId( 'customize-nav-menu-control-location-' ); #>
+                               <li class="customize-control customize-control-checkbox assigned-menu-location customize-inside-control-row">
+                                       <input id="{{ elementId }}" type="checkbox" data-menu-id="{{ data.menu_id }}" data-location-id="<?php echo esc_attr( $location ); ?>" class="menu-location" />
+                                       <label for="{{ elementId }}">
+                                               <?php echo $description; ?>
+                                               <span class="theme-location-set">
+                                                       <?php
+                                                       /* translators: %s: menu name */
+                                                       printf( _x( '(Current: %s)', 'menu location' ),
+                                                               '<span class="current-menu-location-name-' . esc_attr( $location ) . '"></span>'
+                                                       );
+                                                       ?>
+                                               </span>
+                                       </label>
+                               </li>
</ins><span class="cx" style="display: block; padding: 0 10px">                         <?php endforeach; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 </ul>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <?php endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php endif; ?>
+               <?php
</ins><span class="cx" style="display: block; padding: 0 10px">         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span></span></pre>
</div>
</div>

</body>
</html>