<!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>[48418] trunk/src: Upgrade/Install: Use ARIA button class on plugin and theme auto-updates action links</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 { white-space: pre-line; 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/48418">48418</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/48418","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>whyisjake</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-07-10 06:16:06 +0000 (Fri, 10 Jul 2020)</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'>Upgrade/Install: Use ARIA button class on plugin and theme auto-updates action links
According to the [accesability guidelines](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/#semantics-for-controls), the control should be a link when JavaScript is not available and a button the rest of the time.
In addition, handlers were added for spacebar usage, and some changes to the a11y speak verbiage.
Fixes <a href="https://core.trac.wordpress.org/ticket/50516">#50516</a>.
Props ryokuhi, audrasjb, afercia, whyisjake/</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueueswpupdatesjs">trunk/src/js/_enqueues/wp/updates.js</a></li>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadmincssthemescss">trunk/src/wp-admin/css/themes.css</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmsthemeslisttablephp">trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswppluginslisttablephp">trunk/src/wp-admin/includes/class-wp-plugins-list-table.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueueswpupdatesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/wp/updates.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/wp/updates.js 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/js/_enqueues/wp/updates.js 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2677,44 +2677,63 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $( window ).on( 'beforeunload', wp.updates.beforeunload );
</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">- * Click handler for enabling and disabling plugin and theme auto-updates.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Prevents the page form scrolling when activating auto-updates with the Spacebar key.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $document.on( 'click', '.column-auto-updates a.toggle-auto-update, .theme-overlay a.toggle-auto-update', function( event ) {
- var data, asset, type, $parent;
- var $anchor = $( this ),
- action = $anchor.attr( 'data-wp-action' ),
- $label = $anchor.find( '.label' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $document.on( 'keydown', '.column-auto-updates .toggle-auto-update, .theme-overlay .toggle-auto-update', function( event ) {
+ if ( 32 === event.which ) {
+ event.preventDefault();
+ }
+ } );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Click and keyup handler for enabling and disabling plugin and theme auto-updates.
+ *
+ * These controls can be either links or buttons. When JavaScript is enabled,
+ * we want them to behave like buttons. An ARIA role `button` is added via
+ * the JavaScript that targets elements with the CSS class `aria-button-if-js`.
+ *
+ * @since 5.5.0
+ */
+ $document.on( 'click keyup', '.column-auto-updates .toggle-auto-update, .theme-overlay .toggle-auto-update', function( event ) {
+ var data, asset, type, $parent,
+ $toggler = $( this ),
+ action = $toggler.attr( 'data-wp-action' ),
+ $label = $toggler.find( '.label' );
+
+ if ( 'keyup' === event.type && 32 !== event.which ) {
+ return;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'themes' !== pagenow ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $parent = $anchor.closest( '.column-auto-updates' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parent = $toggler.closest( '.column-auto-updates' );
</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">- $parent = $anchor.closest( '.theme-autoupdate' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parent = $toggler.closest( '.theme-autoupdate' );
</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"> event.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Prevent multiple simultaneous requests.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $anchor.attr( 'data-doing-ajax' ) === 'yes' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $toggler.attr( 'data-doing-ajax' ) === 'yes' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</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">- $anchor.attr( 'data-doing-ajax', 'yes' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggler.attr( 'data-doing-ajax', 'yes' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( pagenow ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'plugins':
</span><span class="cx" style="display: block; padding: 0 10px"> case 'plugins-network':
</span><span class="cx" style="display: block; padding: 0 10px"> type = 'plugin';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- asset = $anchor.closest( 'tr' ).attr( 'data-plugin' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ asset = $toggler.closest( 'tr' ).attr( 'data-plugin' );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'themes-network':
</span><span class="cx" style="display: block; padding: 0 10px"> type = 'theme';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- asset = $anchor.closest( 'tr' ).attr( 'data-slug' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ asset = $toggler.closest( 'tr' ).attr( 'data-slug' );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'themes':
</span><span class="cx" style="display: block; padding: 0 10px"> type = 'theme';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- asset = $anchor.attr( 'data-slug' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ asset = $toggler.attr( 'data-slug' );
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</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">@@ -2728,7 +2747,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $label.text( __( 'Disabling...' ) );
</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">- $anchor.find( '.dashicons-update' ).removeClass( 'hidden' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggler.find( '.dashicons-update' ).removeClass( 'hidden' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> data = {
</span><span class="cx" style="display: block; padding: 0 10px"> action: 'toggle-auto-updates',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2740,8 +2759,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $.post( window.ajaxurl, data )
</span><span class="cx" style="display: block; padding: 0 10px"> .done( function( response ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var $enabled, $disabled, enabledNumber, disabledNumber, errorMessage;
- var href = $anchor.attr( 'href' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var $enabled, $disabled, enabledNumber, disabledNumber, errorMessage,
+ href = $toggler.attr( 'href' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! response.success ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // if WP returns 0 for response (which can happen in a few cases),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2784,25 +2803,27 @@
</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 ( 'enable' === action ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- href = href.replace( 'action=enable-auto-update', 'action=disable-auto-update' );
- $anchor.attr( {
- 'data-wp-action': 'disable',
- href: href
- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // The toggler control can be either a link or a button.
+ if ( $toggler[ 0 ].hasAttribute( 'href' ) ) {
+ href = href.replace( 'action=enable-auto-update', 'action=disable-auto-update' );
+ $toggler.attr( 'href', href );
+ }
+ $toggler.attr( 'data-wp-action', 'disable' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $label.text( __( 'Disable auto-updates' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $parent.find( '.auto-update-time' ).removeClass( 'hidden' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.a11y.speak( __( 'Enable auto-updates' ), 'polite' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.a11y.speak( __( 'Auto-updates enabled' ) );
</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">- href = href.replace( 'action=disable-auto-update', 'action=enable-auto-update' );
- $anchor.attr( {
- 'data-wp-action': 'enable',
- href: href
- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // The toggler control can be either a link or a button.
+ if ( $toggler[ 0 ].hasAttribute( 'href' ) ) {
+ href = href.replace( 'action=disable-auto-update', 'action=enable-auto-update' );
+ $toggler.attr( 'href', href );
+ }
+ $toggler.attr( 'data-wp-action', 'enable' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $label.text( __( 'Enable auto-updates' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $parent.find( '.auto-update-time' ).addClass( 'hidden' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.a11y.speak( __( 'Auto-updates disabled' ), 'polite' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.a11y.speak( __( 'Auto-updates disabled' ) );
</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"> $document.trigger( 'wp-auto-update-setting-changed', { state: action, type: type, asset: asset } );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2816,7 +2837,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp.a11y.speak( __( 'The request could not be completed.' ), 'polite' );
</span><span class="cx" style="display: block; padding: 0 10px"> } )
</span><span class="cx" style="display: block; padding: 0 10px"> .always( function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $anchor.removeAttr( 'data-doing-ajax' ).find( '.dashicons-update' ).addClass( 'hidden' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $toggler.removeAttr( 'data-doing-ajax' ).find( '.dashicons-update' ).addClass( 'hidden' );
</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="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 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/wp-admin/css/common.css 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1499,6 +1499,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> animation: rotation 2s infinite linear;
</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">+.theme-overlay .theme-autoupdate .dashicons-update.spin {
+ margin-right: 3px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /* Updated icon (check mark). */
</span><span class="cx" style="display: block; padding: 0 10px"> .updated-message p:before,
</span><span class="cx" style="display: block; padding: 0 10px"> .installed p:before,
</span></span></pre></div>
<a id="trunksrcwpadmincssthemescss"></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/themes.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/themes.css 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/wp-admin/css/themes.css 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -684,6 +684,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> text-decoration: none;
</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">+.theme-overlay .toggle-auto-update {
+ /* Better align spin icon and text. */
+ display: inline-flex;
+ align-items: center;
+ /* Prevents content after the auto-update toggler from jumping down and up. */
+ min-height: 20px; /* Same height as the spinning dashicon. */
+ vertical-align: top;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .theme-overlay .theme-description {
</span><span class="cx" style="display: block; padding: 0 10px"> color: #555;
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 15px;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpmsthemeslisttablephp"></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/class-wp-ms-themes-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -744,7 +744,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $url = add_query_arg( $query_args, 'themes.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $html[] = sprintf(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- '<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ '<a href="%s" class="toggle-auto-update aria-button-if-js" data-wp-action="%s">',
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_url( $url, 'updates' ),
</span><span class="cx" style="display: block; padding: 0 10px"> $action
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswppluginslisttablephp"></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/class-wp-plugins-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1076,7 +1076,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $url = add_query_arg( $query_args, 'plugins.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $html[] = sprintf(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- '<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ '<a href="%s" class="toggle-auto-update aria-button-if-js" data-wp-action="%s">',
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_url( $url, 'updates' ),
</span><span class="cx" style="display: block; padding: 0 10px"> $action
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></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/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php 2020-07-10 06:06:46 UTC (rev 48417)
+++ trunk/src/wp-admin/themes.php 2020-07-10 06:16:06 UTC (rev 48418)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -562,14 +562,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $template = '
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-autoupdate">
</span><span class="cx" style="display: block; padding: 0 10px"> <# if ( data.autoupdate ) { #>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable">
- <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>
- <span class="label">' . __( 'Disable auto-updates' ) . '</span>
- </a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="toggle-auto-update button-link" data-slug="{{ data.id }}" data-wp-action="disable">
+ <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span><span class="label">' . __( 'Disable auto-updates' ) . '</span>
+ </button>
</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">- <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="enable">
- <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>
- <span class="label">' . __( 'Enable auto-updates' ) . '</span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="toggle-auto-update button-link" data-slug="{{ data.id }}" data-wp-action="enable">
+ <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span><span class="label">' . __( 'Enable auto-updates' ) . '</span>
</ins><span class="cx" style="display: block; padding: 0 10px"> </a>
</span><span class="cx" style="display: block; padding: 0 10px"> <# } #>
</span><span class="cx" style="display: block; padding: 0 10px"> <# if ( data.hasUpdate ) { #>
</span></span></pre>
</div>
</div>
</body>
</html>