<!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>[49294] trunk/src: App Passwords: Improve accessibility.</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/49294">49294</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/49294","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>TimothyBlynJacobs</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-10-24 03:32:46 +0000 (Sat, 24 Oct 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'>App Passwords: Improve accessibility.

- Make form inputs stacked instead of inline.
- Provide a visible label for the app name.
- Add screen reader text to dismiss button.
- Make "Revoke" button label more descriptive.
- Use aria-disabled instead of disabled to avoid focus loss.
- Display password in a readonly input to assist copy and paste.
- Remove large sections of italic text.
- Use `.form-wrap` and `.form-field` to give consistent form styling.
- Improve labeling and placeholder text.

Props alexstine, georgestephanis, afercia, TimothyBlynJacobs.
Fixes <a href="https://core.trac.wordpress.org/ticket/51580">#51580</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueuesadminapplicationpasswordsjs">trunk/src/js/_enqueues/admin/application-passwords.js</a></li>
<li><a href="#trunksrcjs_enqueuesadminauthappjs">trunk/src/js/_enqueues/admin/auth-app.js</a></li>
<li><a href="#trunksrcwpadminauthorizeapplicationphp">trunk/src/wp-admin/authorize-application.php</a></li>
<li><a href="#trunksrcwpadmincssformscss">trunk/src/wp-admin/css/forms.css</a></li>
<li><a href="#trunksrcwpadminincludesclasswpapplicationpasswordslisttablephp">trunk/src/wp-admin/includes/class-wp-application-passwords-list-table.php</a></li>
<li><a href="#trunksrcwpadminusereditphp">trunk/src/wp-admin/user-edit.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueuesadminapplicationpasswordsjs"></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/admin/application-passwords.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/admin/application-passwords.js     2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/js/_enqueues/admin/application-passwords.js       2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,6 +17,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $newAppPassButton.click( function( e ) {
</span><span class="cx" style="display: block; padding: 0 10px">                e.preventDefault();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               if ( $newAppPassButton.prop( 'aria-disabled' ) ) {
+                       return;
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 var name = $newAppPassField.val();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( 0 === name.length ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,8 +30,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">                clearErrors();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $newAppPassField.prop( 'disabled', true );
-               $newAppPassButton.prop( 'disabled', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $newAppPassButton.prop( 'aria-disabled', true ).addClass( 'disabled' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                var request = {
</span><span class="cx" style="display: block; padding: 0 10px">                        name: name
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -47,8 +51,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        method: 'POST',
</span><span class="cx" style="display: block; padding: 0 10px">                        data: request
</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">-                        $newAppPassField.prop( 'disabled', false );
-                       $newAppPassButton.prop( 'disabled', false );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $newAppPassButton.removeProp( 'aria-disabled' ).removeClass( 'disabled' );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } ).done( function( response ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $newAppPassField.val( '' );
</span><span class="cx" style="display: block; padding: 0 10px">                        $newAppPassButton.prop( 'disabled', false );
</span></span></pre></div>
<a id="trunksrcjs_enqueuesadminauthappjs"></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/admin/auth-app.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/admin/auth-app.js  2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/js/_enqueues/admin/auth-app.js    2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,13 +21,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( $approveBtn.prop( 'aria-disabled' ) ) {
+                       return;
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( 0 === name.length ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $appNameField.focus();
</span><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">-                $appNameField.prop( 'disabled', true );
-               $approveBtn.prop( 'disabled', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $approveBtn.prop( 'aria-disabled', true ).addClass( 'disabled' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                var request = {
</span><span class="cx" style="display: block; padding: 0 10px">                        name: name
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,17 +85,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                message = wp.i18n.sprintf(
</span><span class="cx" style="display: block; padding: 0 10px">                                        wp.i18n.__( 'Your new password for %1$s is: %2$s.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        '<strong></strong>',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        '<kbd></kbd>'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 '<input type="text" class="code" readonly="readonly" value="" />'
</ins><span class="cx" style="display: block; padding: 0 10px">                                 );
</span><span class="cx" style="display: block; padding: 0 10px">                                $notice = $( '<div></div>' )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .attr( 'role', 'alert' )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .attr( 'tabindex', 0 )
</span><span class="cx" style="display: block; padding: 0 10px">                                        .addClass( 'notice notice-success notice-alt' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        .append( $( '<p></p>' ).html( message ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 .append( $( '<p></p>' ).addClass( 'application-password-display' ).html( message ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                // We're using .text() to write the variables to avoid any chance of XSS.
</span><span class="cx" style="display: block; padding: 0 10px">                                $( 'strong', $notice ).text( name );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $( 'kbd', $notice ).text( response.password );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $( 'input', $notice ).val( response.password );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                $form.replaceWith( $notice );
</span><span class="cx" style="display: block; padding: 0 10px">                                $notice.focus();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,8 +119,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $( 'h1' ).after( $notice );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $appNameField.prop( 'disabled', false );
-                       $approveBtn.prop( 'disabled', false );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $approveBtn.removeProp( 'aria-disabled', false ).removeClass( '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">                         * Fires when an Authorize Application Password request encountered an error when trying to approve the request.
</span></span></pre></div>
<a id="trunksrcwpadminauthorizeapplicationphp"></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/authorize-application.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/authorize-application.php      2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/wp-admin/authorize-application.php        2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,7 +127,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="notice notice-error"><p><?php echo $error->get_error_message(); ?></p></div>
</span><span class="cx" style="display: block; padding: 0 10px">        <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <div class="card js-auth-app-card">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="card auth-app-card">
</ins><span class="cx" style="display: block; padding: 0 10px">                 <h2 class="title"><?php __( 'An application would like to connect to your account.' ); ?></h2>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php if ( $app_name ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,13 +170,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <?php if ( $new_password ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <div class="notice notice-success notice-alt below-h2">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <p class="password-display">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <p class="application-password-display">
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        printf(
</span><span class="cx" style="display: block; padding: 0 10px">                                                /* translators: 1: Application name, 2: Generated password. */
</span><span class="cx" style="display: block; padding: 0 10px">                                                __( 'Your new password for %1$s is %2$s.' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                                '<strong>' . esc_html( $app_name ) . '</strong>',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                '<kbd>' . esc_html( WP_Application_Passwords::chunk_password( $new_password ) ) . '</kbd>'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         sprintf( '<input type="text" class="code" readonly="readonly" value="%s" />', esc_attr( WP_Application_Passwords::chunk_password( $new_password ) ) )
</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">                                </p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,7 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        do_action( 'wp_authorize_application_password_form', $request, $user );
</span><span class="cx" style="display: block; padding: 0 10px">                        ?>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php else : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap">
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php wp_nonce_field( 'authorize_application_password' ); ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                <input type="hidden" name="action" value="authorize_application_password" />
</span><span class="cx" style="display: block; padding: 0 10px">                                <input type="hidden" name="app_id" value="<?php echo esc_attr( $app_id ); ?>" />
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,8 +202,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                <input type="hidden" name="success_url" value="<?php echo esc_url( $success_url ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px">                                <input type="hidden" name="reject_url" value="<?php echo esc_url( $reject_url ); ?>" />
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <label for="app_name"><?php esc_html_e( 'Application Title:' ); ?></label>
-                               <input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" placeholder="<?php esc_attr_e( 'Name this connection&hellip;' ); ?>" required />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <div class="form-field">
+                                       <label for="app_name"><?php _e( 'New Application Password Name' ); ?></label>
+                                       <input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" placeholder="<?php esc_attr_e( 'WordPress App on My Phone' ); ?>" required aria-required="true" />
+                               </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,8 +225,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                do_action( 'wp_authorize_application_password_form', $request, $user );
</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">-                                <p><?php submit_button( __( 'Yes, I approve of this connection.' ), 'primary', 'approve', false ); ?>
-                                       <br /><em>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php
+                               submit_button(
+                                       __( 'Yes, I approve of this connection.' ),
+                                       'primary',
+                                       'approve',
+                                       false,
+                                       array(
+                                               'aria-describedby' => 'description-approve',
+                                       )
+                               );
+                               ?>
+                               <p class="description" id="description-approve">
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        if ( $success_url ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                printf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -245,11 +257,20 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                _e( 'You will be given a password to manually enter into the application in question.' );
</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">-                                        </em>
</del><span class="cx" style="display: block; padding: 0 10px">                                 </p>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <p><?php submit_button( __( 'No, I do not approve of this connection.' ), 'secondary', 'reject', false ); ?>
-                                       <br /><em>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php
+                               submit_button(
+                                       __( 'No, I do not approve of this connection.' ),
+                                       'secondary',
+                                       'reject',
+                                       false,
+                                       array(
+                                               'aria-describedby' => 'description-reject',
+                                       )
+                               );
+                               ?>
+                               <p class="description" id="description-reject">
</ins><span class="cx" style="display: block; padding: 0 10px">                                         <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                        if ( $reject_url ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                printf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -261,7 +282,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                _e( 'You will be returned to the WordPress Dashboard, and no changes will be made.' );
</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">-                                        </em>
</del><span class="cx" style="display: block; padding: 0 10px">                                 </p>
</span><span class="cx" style="display: block; padding: 0 10px">                        </form>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php endif; ?>
</span></span></pre></div>
<a id="trunksrcwpadmincssformscss"></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/forms.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/forms.css  2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/wp-admin/css/forms.css    2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -851,11 +851,28 @@
</span><span class="cx" style="display: block; padding: 0 10px">        cursor: pointer;
</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">+.create-application-password .form-field {
+       max-width: 25em;
+}
+
+.create-application-password label {
+       font-weight: 600;
+}
+
+.create-application-password p.submit {
+       margin-bottom: 0;
+       padding-bottom: 0;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .new-application-password-notice.notice {
</span><span class="cx" style="display: block; padding: 0 10px">        margin-top: 20px;
</span><span class="cx" style="display: block; padding: 0 10px">        margin-bottom: 0;
</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">+.application-password-display input.code {
+       width: 19em;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /*------------------------------------------------------------------------------
</span><span class="cx" style="display: block; padding: 0 10px">   19.0 - Tools
</span><span class="cx" style="display: block; padding: 0 10px"> ------------------------------------------------------------------------------*/
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpapplicationpasswordslisttablephp"></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-application-passwords-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-application-passwords-list-table.php 2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/wp-admin/includes/class-wp-application-passwords-list-table.php   2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -104,9 +104,20 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Handles the revoke column output.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 5.6.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         *
+        * @param array $item The current application password item.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function column_revoke() {
-               submit_button( __( 'Revoke' ), 'delete', 'revoke-application-password', false );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function column_revoke( $item ) {
+               submit_button(
+                       __( 'Revoke' ),
+                       'delete',
+                       'revoke-application-password-' . $item['uuid'],
+                       false,
+                       array(
+                               /* translators: %s: the application password's given name. */
+                               'title' => sprintf( __( 'Revoke "%s"' ), $item['name'] ),
+                       )
+               );
</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">@@ -220,7 +231,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        echo "{{ data.last_ip || '—' }}";
</span><span class="cx" style="display: block; padding: 0 10px">                                        break;
</span><span class="cx" style="display: block; padding: 0 10px">                                case 'revoke':
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        echo $this->column_revoke();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 printf(
+                                               '<input type="submit" class="button delete" value="%1$s" title="%2$s">',
+                                               esc_attr( __( 'Revoke' ) ),
+                                               /* translators: %s: the application password's given name. */
+                                               esc_attr( sprintf( __( 'Revoke "%s"' ), '{{ data.name }}' ) )
+                                       );
</ins><span class="cx" style="display: block; padding: 0 10px">                                         break;
</span><span class="cx" style="display: block; padding: 0 10px">                                default:
</span><span class="cx" style="display: block; padding: 0 10px">                                        /**
</span></span></pre></div>
<a id="trunksrcwpadminusereditphp"></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/user-edit.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/user-edit.php  2020-10-24 00:29:01 UTC (rev 49293)
+++ trunk/src/wp-admin/user-edit.php    2020-10-24 03:32:46 UTC (rev 49294)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -739,9 +739,11 @@
</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">-                <div class="create-application-password">
-                       <label for="new_application_password_name" class="screen-reader-text"><?php _e( 'New Application Password Name' ); ?></label>
-                       <input type="text" size="30" id="new_application_password_name" name="new_application_password_name" placeholder="<?php esc_attr_e( 'New Application Password Name' ); ?>" class="input" />
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <div class="create-application-password form-wrap">
+                       <div class="form-field">
+                               <label for="new_application_password_name"><?php _e( 'New Application Password Name' ); ?></label>
+                               <input type="text" size="30" id="new_application_password_name" name="new_application_password_name" placeholder="<?php esc_attr_e( 'WordPress App on My Phone' ); ?>" class="input" />
+                       </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><span class="cx" style="display: block; padding: 0 10px">                        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -754,7 +756,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        do_action( 'wp_create_application_password_form', $profileuser );
</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">-                        <?php submit_button( __( 'Add New' ), 'secondary', 'do_new_application_password', false ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php submit_button( __( 'Add New' ), 'secondary', 'do_new_application_password' ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                 </div>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="application-passwords-list-table-wrapper">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -856,19 +858,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( isset( $application_passwords_list_table ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">        <script type="text/html" id="tmpl-new-application-password">
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="notice notice-success is-dismissible new-application-password-notice" role="alert" tabindex="0">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <p class="application-password-display">
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <?php
</span><span class="cx" style="display: block; padding: 0 10px">                                printf(
</span><span class="cx" style="display: block; padding: 0 10px">                                        /* translators: 1: Application name, 2: Generated password. */
</span><span class="cx" style="display: block; padding: 0 10px">                                        esc_html__( 'Your new password for %1$s is: %2$s' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        '<strong>{{ data.name }}</strong>',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        '<kbd>{{ data.password }}</kbd>'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 '<input type="text" class="code" readonly="readonly" value="{{ data.password }}" />'
</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">                        </p>
</span><span class="cx" style="display: block; padding: 0 10px">                        <p><?php esc_attr_e( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px">                        <button type="button" class="notice-dismiss">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <span class="screen-reader-text"><?php __( 'Dismiss this notice.' ); ?></span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <span class="screen-reader-text"><?php _e( 'Dismiss this notice.' ); ?></span>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </button>
</span><span class="cx" style="display: block; padding: 0 10px">                </div>
</span><span class="cx" style="display: block; padding: 0 10px">        </script>
</span></span></pre>
</div>
</div>

</body>
</html>