<!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>[40480] trunk/src: Accessibility: Make some Widgets buttons real buttons.</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/40480">40480</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/40480","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>2017-04-19 21:13:53 +0000 (Wed, 19 Apr 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'>Accessibility: Make some Widgets buttons real buttons.
Links used as UI controls that behave like buttons, should be buttons.
- changes the widgets "toggle", "Delete", and "Close" links to buttons
- uses `aria-expanded` to announce the state of the toggle buttons
- increases a bit the clickable area of the toggle
- ensures the "circular focus" doesn't get cut-off in some browsers by centering the toggle arrows
- uses a `<span>` element with an `aria-hidden` attribute to hide CSS generated font icons from assistive technologies
- standardizes on `.toggle-indicator:before` rather than `:after`
- changes two `#f00` reds in `#dc3232`, see <a href="https://core.trac.wordpress.org/ticket/35622">#35622</a>
Fixes <a href="https://core.trac.wordpress.org/ticket/31476">#31476</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadmincsscustomizenavmenuscss">trunk/src/wp-admin/css/customize-nav-menus.css</a></li>
<li><a href="#trunksrcwpadmincsscustomizewidgetscss">trunk/src/wp-admin/css/customize-widgets.css</a></li>
<li><a href="#trunksrcwpadmincsswidgetscss">trunk/src/wp-admin/css/widgets.css</a></li>
<li><a href="#trunksrcwpadminincludeswidgetsphp">trunk/src/wp-admin/includes/widgets.php</a></li>
<li><a href="#trunksrcwpadminjscustomizewidgetsjs">trunk/src/wp-admin/js/customize-widgets.js</a></li>
<li><a href="#trunksrcwpadminjswidgetsjs">trunk/src/wp-admin/js/widgets.js</a></li>
<li><a href="#trunksrcwpincludescssbuttonscss">trunk/src/wp-includes/css/buttons.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscommoncss"></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/common.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/common.css 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/css/common.css 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -865,8 +865,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> border-bottom: 1px solid #fafafa;
</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">-.widget-control-remove,
-.widget-control-remove:focus,
</del><span class="cx" style="display: block; padding: 0 10px"> .row-actions span.delete a,
</span><span class="cx" style="display: block; padding: 0 10px"> .row-actions span.trash a,
</span><span class="cx" style="display: block; padding: 0 10px"> .row-actions span.spam a,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -893,14 +891,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> #media-items a.delete:hover,
</span><span class="cx" style="display: block; padding: 0 10px"> #media-items a.delete-permanently:hover,
</span><span class="cx" style="display: block; padding: 0 10px"> #nav-menu-footer .menu-delete:hover {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- color: #f00;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ color: #dc3232;
</ins><span class="cx" style="display: block; padding: 0 10px"> border: none;
</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">-.widget-control-remove:hover {
- color: #f00;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> /*------------------------------------------------------------------------------
</span><span class="cx" style="display: block; padding: 0 10px"> 3.0 - Actions
</span><span class="cx" style="display: block; padding: 0 10px"> ------------------------------------------------------------------------------*/
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3244,25 +3238,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* @todo: can we use a common class for these? */
</span><span class="cx" style="display: block; padding: 0 10px"> .nav-menus-php .item-edit:before,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.widget-top a.widget-action:after,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.widget-top .widget-action .toggle-indicator:before,
</ins><span class="cx" style="display: block; padding: 0 10px"> .control-section .accordion-section-title:after,
</span><span class="cx" style="display: block; padding: 0 10px"> .accordion-section-title:after {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- right: 0;
</del><span class="cx" style="display: block; padding: 0 10px"> content: "\f140";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- border: none;
- background: none;
</del><span class="cx" style="display: block; padding: 0 10px"> font: normal 20px/1 dashicons;
</span><span class="cx" style="display: block; padding: 0 10px"> speak: none;
</span><span class="cx" style="display: block; padding: 0 10px"> display: block;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- padding: 0;
- text-indent: 0;
- text-align: center;
- position: relative;
</del><span class="cx" style="display: block; padding: 0 10px"> -webkit-font-smoothing: antialiased;
</span><span class="cx" style="display: block; padding: 0 10px"> -moz-osx-font-smoothing: grayscale;
</span><span class="cx" style="display: block; padding: 0 10px"> text-decoration: none !important;
</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">+.widget-top .widget-action .toggle-indicator:before {
+ padding: 1px 2px 1px 0px;
+ -webkit-border-radius: 50%;
+ border-radius: 50%;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .handlediv,
</span><span class="cx" style="display: block; padding: 0 10px"> .postbox .handlediv.button-link,
</span><span class="cx" style="display: block; padding: 0 10px"> .item-edit,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3288,15 +3281,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> color: #23282d;
</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">-.widget-top a.widget-action:after {
- padding: 1px 2px 1px 0px;
- margin-top: 10px;
- margin-right: 10px;
- -webkit-border-radius: 50%;
- border-radius: 50%;
-}
-
-.widget-top a.widget-action:focus:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.widget-top .widget-action:focus .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> -webkit-box-shadow:
</span><span class="cx" style="display: block; padding: 0 10px"> 0 0 0 1px #5b9dd9,
</span><span class="cx" style="display: block; padding: 0 10px"> 0 0 2px 1px rgba(30,140,190,.8);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3315,7 +3300,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .control-section.open .accordion-section-title:after,
</span><span class="cx" style="display: block; padding: 0 10px"> #customize-info.open .accordion-section-title:after,
</span><span class="cx" style="display: block; padding: 0 10px"> .nav-menus-php .menu-item-edit-active .item-edit:before,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.widget.open .widget-top a.widget-action:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.widget.open .widget-top .widget-action .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f142";
</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">@@ -3594,8 +3579,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* @todo: evaluate - most of these were likely replaced by dashicons */
</span><span class="cx" style="display: block; padding: 0 10px"> .curtime #timestamp,
</span><span class="cx" style="display: block; padding: 0 10px"> #screen-meta-links a.show-settings,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- .widget-top a.widget-action,
- .widget-top a.widget-action:hover,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .widget-top .widget-action,
+ .widget-top .widget-action:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> .sidebar-name-arrow,
</span><span class="cx" style="display: block; padding: 0 10px"> .sidebar-name:hover .sidebar-name-arrow,
</span><span class="cx" style="display: block; padding: 0 10px"> .meta-box-sortables .postbox:hover .handlediv,
</span></span></pre></div>
<a id="trunksrcwpadmincsscustomizenavmenuscss"></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-nav-menus.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/customize-nav-menus.css 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/css/customize-nav-menus.css 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,7 +153,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> text-align: center;
</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">-.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f142";
</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">@@ -271,17 +271,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> display: inline-block;
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 20px;
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 1;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- text-indent: -1px; /* account for the dashicon alignment */
</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"> .rtl .wp-customizer .toggle-indicator {
</span><span class="cx" style="display: block; padding: 0 10px"> text-indent: 1px; /* account for the dashicon alignment */
</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">-.wp-customizer .toggle-indicator:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-customizer .menu-item .item-edit .toggle-indicator:before,
+#available-menu-items .accordion-section-title .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f140";
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ display: block;
+ padding: 1px 2px 1px 0px;
</ins><span class="cx" style="display: block; padding: 0 10px"> speak: none;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- vertical-align: top;
</del><span class="cx" style="display: block; padding: 0 10px"> -webkit-border-radius: 50%;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: 50%;
</span><span class="cx" style="display: block; padding: 0 10px"> color: #72777c;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -494,13 +495,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> content: none !important;
</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">-#available-menu-items .accordion-section-title:hover .toggle-indicator:after,
-#available-menu-items .button-link:hover .toggle-indicator:after,
-#available-menu-items .button-link:focus .toggle-indicator:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#available-menu-items .accordion-section-title:hover .toggle-indicator:before,
+#available-menu-items .button-link:hover .toggle-indicator:before,
+#available-menu-items .button-link:focus .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #23282d;
</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">-#available-menu-items .open .accordion-section-title .toggle-indicator:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#available-menu-items .open .accordion-section-title .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f142";
</span><span class="cx" style="display: block; padding: 0 10px"> color: #23282d;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -837,7 +838,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-customizer .menu-item .submitbox .submitdelete:focus,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-screen-options-toggle:focus:before,
</span><span class="cx" style="display: block; padding: 0 10px"> #customize-controls .customize-info .customize-help-toggle:focus:before,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.wp-customizer button:focus .toggle-indicator:after,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-customizer button:focus .toggle-indicator:before,
</ins><span class="cx" style="display: block; padding: 0 10px"> .menu-delete:focus,
</span><span class="cx" style="display: block; padding: 0 10px"> .menu-item-bar .item-delete:focus:before,
</span><span class="cx" style="display: block; padding: 0 10px"> #available-menu-items .item-add:focus:before {
</span></span></pre></div>
<a id="trunksrcwpadmincsscustomizewidgetscss"></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-widgets.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/customize-widgets.css 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/css/customize-widgets.css 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,15 +89,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 16px;
</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-widget_form.expanded a.widget-action:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-widget_form.expanded .widget-action .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f142";
</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-widget_form.wide-widget-control a.widget-action:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-widget_form.wide-widget-control .widget-action .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f139";
</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-widget_form.wide-widget-control.expanded a.widget-action:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-widget_form.wide-widget-control.expanded .widget-action .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f141";
</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">@@ -438,9 +438,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .last-widget {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-bottom: 15px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* This rule reduces the widgets titles height. */
</ins><span class="cx" style="display: block; padding: 0 10px"> .widget-title h3 {
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 13px 15px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .widget-top .widget-action {
+ padding-bottom: 8px;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> .widget-reorder-nav span {
</span><span class="cx" style="display: block; padding: 0 10px"> height: 39px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadmincsswidgetscss"></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/widgets.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/widgets.css 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/css/widgets.css 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,12 +14,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> background: #f7f7f7;
</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">-.widget-top a.widget-action,
-.widget-top a.widget-action:hover {
- -webkit-box-shadow: none;
- box-shadow: none;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.widget-top .widget-action {
+ border: 0;
+ margin: 0;
+ padding: 10px;
+ background: none;
+ cursor: pointer;
</ins><span class="cx" style="display: block; padding: 0 10px"> outline: none;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- text-decoration: none;
</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"> .widget-title h3,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +51,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"> .deleting .widget-title,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.deleting .widget-top a.widget-action:after {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.deleting .widget-top .widget-action .toggle-indicator:before {
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #a0a5aa;
</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="trunksrcwpadminincludeswidgetsphp"></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/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/widgets.php 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/includes/widgets.php 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -219,7 +219,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo $sidebar_args['before_widget']; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="widget-top">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="widget-title-action">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="widget-action hide-if-no-js" href="#available-widgets"></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="widget-action hide-if-no-js" aria-expanded="false">
+ <span class="screen-reader-text"><?php printf( __( 'Edit widget: %s' ), $widget_title ); ?></span>
+ <span class="toggle-indicator" aria-hidden="true"></span>
+ </button>
</ins><span class="cx" style="display: block; padding: 0 10px"> <a class="widget-control-edit hide-if-js" href="<?php echo esc_url( add_query_arg( $query_arg ) ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="edit"><?php _ex( 'Edit', 'widget' ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <span class="add"><?php _ex( 'Add', 'widget' ); ?></span>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -250,8 +253,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="widget-control-actions">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="alignleft">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="widget-control-remove" href="#remove"><?php _e('Delete'); ?></a> |
- <a class="widget-control-close" href="#close"><?php _e('Close'); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="button-link button-link-delete widget-control-remove"><?php _e( 'Delete' ); ?></button> |
+ <button type="button" class="button-link widget-control-close"><?php _e( 'Close' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?>
</span></span></pre></div>
<a id="trunksrcwpadminjscustomizewidgetsjs"></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/customize-widgets.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/customize-widgets.js 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/js/customize-widgets.js 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -952,7 +952,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var self = this, $removeBtn, replaceDeleteWithRemove;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Configure remove button
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $removeBtn = this.container.find( 'a.widget-control-remove' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $removeBtn = this.container.find( '.widget-control-remove' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $removeBtn.on( 'click', function( e ) {
</span><span class="cx" style="display: block; padding: 0 10px"> e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -988,7 +988,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"> replaceDeleteWithRemove = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $removeBtn.text( l10n.removeBtnLabel ); // wp_widget_control() outputs the link as "Delete"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $removeBtn.text( l10n.removeBtnLabel ); // wp_widget_control() outputs the button as "Delete"
</ins><span class="cx" style="display: block; padding: 0 10px"> $removeBtn.attr( 'title', l10n.removeBtnTooltip );
</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">@@ -1367,7 +1367,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {Object} args merged on top of this.defaultActiveArguments
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> onChangeExpanded: function ( expanded, args ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var self = this, $widget, $inside, complete, prevComplete, expandControl;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var self = this, $widget, $inside, complete, prevComplete, expandControl, $toggleBtn;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self.embedWidgetControl(); // Make sure the outer form is embedded so that the expanded state can be set in the UI.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( expanded ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1386,6 +1386,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = this.container.find( 'div.widget:first' );
</span><span class="cx" style="display: block; padding: 0 10px"> $inside = $widget.find( '.widget-inside:first' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggleBtn = this.container.find( '.widget-top button.widget-action' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> expandControl = function() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1399,6 +1400,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> complete = function() {
</span><span class="cx" style="display: block; padding: 0 10px"> self.container.removeClass( 'expanding' );
</span><span class="cx" style="display: block; padding: 0 10px"> self.container.addClass( 'expanded' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggleBtn.attr( 'aria-expanded', 'true' );
</ins><span class="cx" style="display: block; padding: 0 10px"> self.container.trigger( 'expanded' );
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> if ( args.completeCallback ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1428,10 +1430,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> expandControl();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> complete = function() {
</span><span class="cx" style="display: block; padding: 0 10px"> self.container.removeClass( 'collapsing' );
</span><span class="cx" style="display: block; padding: 0 10px"> self.container.removeClass( 'expanded' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggleBtn.attr( 'aria-expanded', 'false' );
</ins><span class="cx" style="display: block; padding: 0 10px"> self.container.trigger( 'collapsed' );
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> if ( args.completeCallback ) {
</span></span></pre></div>
<a id="trunksrcwpadminjswidgetsjs"></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/widgets.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/widgets.js 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-admin/js/widgets.js 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,7 +41,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $(document.body).bind('click.widgets-toggle', function(e) {
</span><span class="cx" style="display: block; padding: 0 10px"> var target = $(e.target),
</span><span class="cx" style="display: block; padding: 0 10px"> css = { 'z-index': 100 },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- widget, inside, targetWidth, widgetWidth, margin;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ widget, inside, targetWidth, widgetWidth, margin,
+ toggleBtn = target.closest( '.widget' ).find( '.widget-top button.widget-action' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( target.parents('.widget-top').length && ! target.parents('#available-widgets').length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> widget = target.closest('div.widget');
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,10 +61,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> css[ margin ] = widgetWidth - ( targetWidth + 30 ) + 'px';
</span><span class="cx" style="display: block; padding: 0 10px"> widget.css( css );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- widget.addClass( 'open' );
- inside.slideDown('fast');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Don't change the order of attributes changes and animation:
+ * it's important for screen readers, see ticket #31476.
+ */
+ toggleBtn.attr( 'aria-expanded', 'true' );
+ inside.slideDown( 'fast', function() {
+ widget.addClass( 'open' );
+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- inside.slideUp('fast', function() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Don't change the order of attributes changes and animation:
+ * it's important for screen readers, see ticket #31476.
+ */
+ toggleBtn.attr( 'aria-expanded', 'false' );
+ inside.slideUp( 'fast', function() {
</ins><span class="cx" style="display: block; padding: 0 10px"> widget.attr( 'style', '' );
</span><span class="cx" style="display: block; padding: 0 10px"> widget.removeClass( 'open' );
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,6 +90,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else if ( target.hasClass('widget-control-close') ) {
</span><span class="cx" style="display: block; padding: 0 10px"> widget = target.closest('div.widget');
</span><span class="cx" style="display: block; padding: 0 10px"> widget.removeClass( 'open' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ toggleBtn.attr( 'aria-expanded', 'false' );
</ins><span class="cx" style="display: block; padding: 0 10px"> wpWidgets.close( widget );
</span><span class="cx" style="display: block; padding: 0 10px"> e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px"> } else if ( target.attr( 'id' ) === 'inactive-widgets-control-remove' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wpWidgets.appendTitle( this );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this.find( 'p.widget-error' ).length ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this.find( 'a.widget-action' ).trigger('click');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this.find( '.widget-action' ).trigger( 'click' ).attr( 'aria-expanded', 'true' );
</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">@@ -182,6 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( inside.css('display') === 'block' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> ui.item.removeClass('open');
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ui.item.find( '.widget-top button.widget-action' ).attr( 'aria-expanded', 'false' );
</ins><span class="cx" style="display: block; padding: 0 10px"> inside.hide();
</span><span class="cx" style="display: block; padding: 0 10px"> $(this).sortable('refreshPositions');
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -254,7 +268,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"> if ( addNew ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $widget.find( 'a.widget-action' ).trigger('click');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $widget.find( '.widget-action' ).trigger( 'click' );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> wpWidgets.saveOrder( $sidebar.attr('id') );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -492,7 +506,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> close : function(widget) {
</span><span class="cx" style="display: block; padding: 0 10px"> widget.children('.widget-inside').slideUp('fast', function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- widget.attr( 'style', '' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ widget.attr( 'style', '' )
+ .find( '.widget-top button.widget-action' )
+ .attr( 'aria-expanded', 'false' )
+ .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">
</span></span></pre></div>
<a id="trunksrcwpincludescssbuttonscss"></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/css/buttons.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/css/buttons.css 2017-04-19 19:53:00 UTC (rev 40479)
+++ trunk/src/wp-includes/css/buttons.css 2017-04-19 21:13:53 UTC (rev 40480)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -242,7 +242,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-core-ui .button-link-delete:hover,
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-core-ui .button-link-delete:focus {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- color: #f00;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ color: #dc3232;
</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"> .ie8 .wp-core-ui .button-link:focus {
</span></span></pre>
</div>
</div>
</body>
</html>