<!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>[36379] trunk/src: Accessibility: Remove title attributes from the Menus screen.</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/36379">36379</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/36379","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>afercia</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-01-22 14:25:58 +0000 (Fri, 22 Jan 2016)</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'>Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones.
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.
Fixes <a href="https://core.trac.wordpress.org/ticket/35374">#35374</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincssnavmenuscss">trunk/src/wp-admin/css/nav-menus.css</a></li>
<li><a href="#trunksrcwpadminincludesnavmenuphp">trunk/src/wp-admin/includes/nav-menu.php</a></li>
<li><a href="#trunksrcwpadminjscommonjs">trunk/src/wp-admin/js/common.js</a></li>
<li><a href="#trunksrcwpadminjsnavmenujs">trunk/src/wp-admin/js/nav-menu.js</a></li>
<li><a href="#trunksrcwpadminnavmenusphp">trunk/src/wp-admin/nav-menus.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizenavmenusphp">trunk/src/wp-includes/class-wp-customize-nav-menus.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincssnavmenuscss"></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/nav-menus.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/nav-menus.css 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-admin/css/nav-menus.css 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,10 +61,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> position: relative;
</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">-.blank-slate .menu-name {
- height: 2em;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .blank-slate .menu-settings {
</span><span class="cx" style="display: block; padding: 0 10px"> border: none;
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,7 +175,10 @@
</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"> #nav-menu-header .menu-name-label {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- margin-top: 4px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ display: inline-block;
+ vertical-align: middle;
+ margin-right: 7px;
+ font-style: italic;
</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"> .nav-menus-php #post-body div.updated,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -248,27 +247,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> border-right: 1px solid #ccc;
</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">-#wpbody .open-label {
- display: block;
- float:left;
-}
-
-#wpbody .open-label span {
- padding-right: 10px;
-}
-
-.js .input-with-default-title {
- color: #a0a5aa;
- font-style: italic;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> #menu-management .inside {
</span><span class="cx" style="display: block; padding: 0 10px"> 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 class="cx" style="display: block; padding: 0 10px"> /* Add Menu Item Boxes */
</span><span class="cx" style="display: block; padding: 0 10px"> .postbox .howto input,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.accordion-container .howto input {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customlinkdiv .menu-item-textbox {
</ins><span class="cx" style="display: block; padding: 0 10px"> width: 180px;
</span><span class="cx" style="display: block; padding: 0 10px"> float: right;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -277,10 +262,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin: 0;
</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">-.customlinkdiv .howto input {
- width: 180px;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .customlinkdiv p {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 0
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -355,6 +336,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* Create Menu */
</span><span class="cx" style="display: block; padding: 0 10px"> #menu-name {
</span><span class="cx" style="display: block; padding: 0 10px"> width: 270px;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ vertical-align: middle;
</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"> #manage-menu .inside {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -381,10 +363,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> width: 180px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customlinkdiv label,
</ins><span class="cx" style="display: block; padding: 0 10px"> .nav-menus-php .howto span {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ float: left;
</ins><span class="cx" style="display: block; padding: 0 10px"> margin-top: 6px;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- display: block;
- float: left;
</del><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"> /* Menu item types */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -731,14 +713,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* Major/minor publishing actions (classes) */
</span><span class="cx" style="display: block; padding: 0 10px"> .nav-menus-php .major-publishing-actions {
</span><span class="cx" style="display: block; padding: 0 10px"> clear: both;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- padding: 3px 0 6px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ padding: 7px 0 6px;
</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"> .nav-menus-php .major-publishing-actions .publishing-action {
</span><span class="cx" style="display: block; padding: 0 10px"> text-align: right;
</span><span class="cx" style="display: block; padding: 0 10px"> float: right;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- line-height: 23px;
- margin: 4px 0 1px;
</del><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"> .nav-menus-php .blank-slate .menu-settings {
</span></span></pre></div>
<a id="trunksrcwpadminincludesnavmenuphp"></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/includes/nav-menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/nav-menu.php 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-admin/includes/nav-menu.php 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -264,17 +264,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="customlinkdiv" id="customlinkdiv">
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" value="custom" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-type]" />
</span><span class="cx" style="display: block; padding: 0 10px"> <p id="menu-item-url-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label class="howto" for="custom-menu-item-url">
- <span><?php _e('URL'); ?></span>
- <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
- </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
+ <input id="custom-menu-item-url" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <p id="menu-item-name-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label class="howto" for="custom-menu-item-name">
- <span><?php _e( 'Link Text' ); ?></span>
- <input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-title]" type="text" class="regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Menu Item'); ?>" />
- </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
+ <input id="custom-menu-item-name" name="menu-item[<?php echo $_nav_menu_placeholder; ?>][menu-item-title]" type="text" class="regular-text menu-item-textbox" />
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="button-controls">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -435,7 +431,8 @@
</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"> <p class="quick-search-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label for="quick-search-posttype-<?php echo $post_type_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
+ <input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" id="quick-search-posttype-<?php echo $post_type_name; ?>" />
</ins><span class="cx" style="display: block; padding: 0 10px"> <span class="spinner"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -714,7 +711,8 @@
</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"> <p class="quick-search-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label for="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" class="screen-reader-text"><?php _e( 'Search' ); ?></label>
+ <input type="search" class="quick-search" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" id="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
</ins><span class="cx" style="display: block; padding: 0 10px"> <span class="spinner"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php submit_button( __( 'Search' ), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span></span></pre></div>
<a id="trunksrcwpadminjscommonjs"></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/js/common.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/common.js 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-admin/js/common.js 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -913,6 +913,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> aria_button_if_js();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', setPinMenu );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // Set initial focus on a specific element.
+ $( '.wp-initial-focus' ).focus();
</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"> // Fire a custom jQuery event at the end of window resize
</span></span></pre></div>
<a id="trunksrcwpadminjsnavmenujs"></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/js/nav-menu.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/nav-menu.js 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-admin/js/nav-menu.js 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,6 +30,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> menusChanged : false,
</span><span class="cx" style="display: block; padding: 0 10px"> isRTL: !! ( 'undefined' != typeof isRtl && isRtl ),
</span><span class="cx" style="display: block; padding: 0 10px"> negateIfRTL: ( 'undefined' != typeof isRtl && isRtl ) ? -1 : 1,
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ lastSearch: '',
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Functions that run on init.
</span><span class="cx" style="display: block; padding: 0 10px"> init : function() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +41,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this.attachMenuEditListeners();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.setupInputWithDefaultTitle();
</del><span class="cx" style="display: block; padding: 0 10px"> this.attachQuickSearchListeners();
</span><span class="cx" style="display: block; padding: 0 10px"> this.attachThemeLocationsListeners();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -444,35 +444,35 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Where can they move this menu item?
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 0 !== position ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-up' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveUp ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveUp ).css( 'display', 'inline' );
</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"> if ( 0 !== position && isPrimaryMenuItem ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-top' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveToTop ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveToTop ).css( 'display', 'inline' );
</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"> if ( position + 1 !== totalMenuItems && 0 !== position ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-down' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveDown ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveDown ).css( 'display', 'inline' );
</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"> if ( 0 === position && 0 !== hasSameDepthSibling ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-down' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveDown ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveDown ).css( 'display', 'inline' );
</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"> if ( ! isPrimaryMenuItem ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-left' ),
</span><span class="cx" style="display: block; padding: 0 10px"> thisLinkText = menus.outFrom.replace( '%s', prevItemNameLeft );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveOutFrom.replace( '%s', prevItemNameLeft ) ).text( thisLinkText ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveOutFrom.replace( '%s', prevItemNameLeft ) ).text( thisLinkText ).css( 'display', 'inline' );
</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"> if ( 0 !== position ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( menuItem.find( '.menu-item-data-parent-id' ).val() !== menuItem.prev().find( '.menu-item-data-db-id' ).val() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> thisLink = menuItem.find( '.menus-move-right' ),
</span><span class="cx" style="display: block; padding: 0 10px"> thisLinkText = menus.under.replace( '%s', prevItemNameRight );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- thisLink.prop( 'title', menus.moveUnder.replace( '%s', prevItemNameRight ) ).text( thisLinkText ).css( 'display', 'inline' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ thisLink.attr( 'aria-label', menus.moveUnder.replace( '%s', prevItemNameRight ) ).text( thisLinkText ).css( 'display', 'inline' );
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -494,7 +494,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> title = menus.subMenuFocus.replace( '%1$s', itemName ).replace( '%2$d', itemPosition ).replace( '%3$s', parentItemName );
</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">- $this.prop('title', title).text( title );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // @todo Consider to update just the `aria-label` attribute.
+ $this.attr( 'aria-label', title ).text( title );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Mark this item's accessibility as refreshed
</span><span class="cx" style="display: block; padding: 0 10px"> $this.data( 'needs_accessibility_refresh', false );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -833,36 +834,6 @@
</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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * An interface for managing default values for input elements
- * that is both JS and accessibility-friendly.
- *
- * Input elements that add the class 'input-with-default-title'
- * will have their values set to the provided HTML title when empty.
- */
- setupInputWithDefaultTitle : function() {
- var name = 'input-with-default-title';
-
- $('.' + name).each( function(){
- var $t = $(this), title = $t.attr('title'), val = $t.val();
- $t.data( name, title );
-
- if( '' === val ) $t.val( title );
- else if ( title == val ) return;
- else $t.removeClass( name );
- }).focus( function(){
- var $t = $(this);
- if( $t.val() == $t.data(name) )
- $t.val('').removeClass( name );
- }).blur( function(){
- var $t = $(this);
- if( '' === $t.val() )
- $t.addClass( name ).val( $t.data(name) );
- });
-
- $( '.blank-slate .input-with-default-title' ).focus();
- },
-
</del><span class="cx" style="display: block; padding: 0 10px"> attachThemeLocationsListeners : function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var loc = $('#nav-menu-theme-locations'), params = {};
</span><span class="cx" style="display: block; padding: 0 10px"> params.action = 'menu-locations-save';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -880,9 +851,21 @@
</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"> attachQuickSearchListeners : function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var searchTimer;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var searchTimer,
+ inputEvent;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('.quick-search').keypress(function(e){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Use feature detection to determine whether password inputs should use
+ * the `keyup` or `input` event. Input is preferred but lacks support
+ * in legacy browsers. See changeset 34078, see also ticket #26600#comment:59
+ */
+ if ( 'oninput' in document.createElement( 'input' ) ) {
+ inputEvent = 'input';
+ } else {
+ inputEvent = 'keyup';
+ }
+
+ $( '.quick-search' ).on( inputEvent, function( e ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var t = $(this);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if( 13 == e.which ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -894,17 +877,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> searchTimer = setTimeout(function(){
</span><span class="cx" style="display: block; padding: 0 10px"> api.updateQuickSearchResults( t );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }, 400);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }, 500 );
+ }).on( 'blur', function() {
+ api.lastSearch = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> }).attr('autocomplete','off');
</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"> updateQuickSearchResults : function(input) {
</span><span class="cx" style="display: block; padding: 0 10px"> var panel, params,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- minSearchLength = 2,
- q = input.val();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ minSearchLength = 2,
+ q = input.val();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if( q.length < minSearchLength ) return;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Minimum characters for a search. Also avoid a new AJAX search when
+ * the pressed key (e.g. arrows) doesn't change the searched term.
+ */
+ if ( q.length < minSearchLength || api.lastSearch == q ) {
+ return;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ api.lastSearch = q;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> panel = input.parents('.tabs-panel');
</span><span class="cx" style="display: block; padding: 0 10px"> params = {
</span><span class="cx" style="display: block; padding: 0 10px"> 'action': 'menu-quick-search',
</span></span></pre></div>
<a id="trunksrcwpadminnavmenusphp"></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/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/nav-menus.php 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-admin/nav-menus.php 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -736,17 +736,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_field( 'update-nav_menu', 'update-nav-menu-nonce' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $one_theme_location_no_menus ) { ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $menu_name_aria_desc = $add_new_screen ? ' aria-describedby="menu-name-desc"' : '';
+
+ if ( $one_theme_location_no_menus ) {
+ $menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"';
+ ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" name="zero-menu-state" value="true" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php } ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php } else {
+ $menu_name_val = 'value="' . esc_attr( $nav_menu_selected_title ) . '"';
+ } ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" name="action" value="update" />
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="nav-menu-header">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="major-publishing-actions">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label class="menu-name-label howto open-label" for="menu-name">
- <span><?php _e( 'Menu Name' ); ?></span>
- <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e( 'Enter menu name here' ); ?>" value="<?php if ( $one_theme_location_no_menus ) _e( 'Menu 1' ); else echo esc_attr( $nav_menu_selected_title ); ?>" />
- </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label class="menu-name-label" for="menu-name"><?php _e( 'Menu Name' ); ?></label>
+ <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox" <?php echo $menu_name_val . $menu_name_aria_desc; ?> />
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="publishing-action">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- END .publishing-action -->
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -769,7 +773,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $add_new_screen ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <p class="post-body-plain"><?php _e( 'Give your menu a name above, then click Create Menu.' ); ?></p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <p class="post-body-plain" id="menu-name-desc"><?php _e( 'Give your menu a name, then click Create Menu.' ); ?></p>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php if ( isset( $_GET['use-location'] ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -801,7 +805,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="checkbox"<?php checked( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $nav_menu_selected_id ); ?> name="menu-locations[<?php echo esc_attr( $location ); ?>]" id="locations-<?php echo esc_attr( $location ); ?>" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="locations-<?php echo esc_attr( $location ); ?>"><?php echo $description; ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( ! empty( $menu_locations[ $location ] ) && $menu_locations[ $location ] != $nav_menu_selected_id ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="theme-location-set"><?php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="theme-location-set"><?php
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: menu name */
</span><span class="cx" style="display: block; padding: 0 10px"> printf( _x( '(Currently set to: %s)', 'menu location' ),
</span><span class="cx" style="display: block; padding: 0 10px"> wp_get_nav_menu_object( $menu_locations[ $location ] )->name
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizenavmenusphp"></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-nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-nav-menus.php 2016-01-22 07:23:56 UTC (rev 36378)
+++ trunk/src/wp-includes/class-wp-customize-nav-menus.php 2016-01-22 14:25:58 UTC (rev 36379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -743,19 +743,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="toggle-indicator" aria-hidden="true"></span>
</span><span class="cx" style="display: block; padding: 0 10px"> </button>
</span><span class="cx" style="display: block; padding: 0 10px"> </h4>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div class="accordion-section-content">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="accordion-section-content customlinkdiv">
</ins><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" />
</span><span class="cx" style="display: block; padding: 0 10px"> <p id="menu-item-url-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label class="howto" for="custom-menu-item-url">
- <span><?php _e( 'URL' ); ?></span>
- <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://">
- </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label class="howto" for="custom-menu-item-url"><?php _e( 'URL' ); ?></label>
+ <input id="custom-menu-item-url" name="menu-item[-1][menu-item-url]" type="text" class="code menu-item-textbox" value="http://">
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> <p id="menu-item-name-wrap">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <label class="howto" for="custom-menu-item-name">
- <span><?php _e( 'Link Text' ); ?></span>
- <input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
- </label>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <label class="howto" for="custom-menu-item-name"><?php _e( 'Link Text' ); ?></label>
+ <input id="custom-menu-item-name" name="menu-item[-1][menu-item-title]" type="text" class="regular-text menu-item-textbox">
</ins><span class="cx" style="display: block; padding: 0 10px"> </p>
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="button-controls">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="add-to-menu">
</span></span></pre>
</div>
</div>
</body>
</html>