WordPress.org

Make WordPress Core

Ticket #32510: 32510-2.patch

File 32510-2.patch, 4.1 KB (added by alexstine, 19 months ago)

Adds required attribute to all form fields in wp-login.php.

  • wp-login.php

     
    280280         */
    281281        do_action( 'login_footer' );
    282282        ?>
    283         <div class="clear"></div>
     283        <div aria-hidden="true" class="clear"></div>
    284284        </body>
    285285        </html>
    286286        <?php
     
    603603        <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
    604604        <p>
    605605                <label for="user_login" ><?php _e( 'Username or Email Address' ); ?><br />
    606                 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label>
     606                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" required/></label>
    607607        </p>
    608608        <?php
    609609        /**
     
    711711
    712712                <div class="wp-pwd">
    713713                        <div class="password-input-wrapper">
    714                                 <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" />
    715                                 <span class="button button-secondary wp-hide-pw hide-if-no-js">
     714                                <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" required/>
     715                                <span aria-hidden="true" class="button button-secondary wp-hide-pw hide-if-no-js">
    716716                                        <span class="dashicons dashicons-hidden"></span>
    717717                                </span>
    718718                        </div>
     
    728728
    729729        <p class="user-pass2-wrap">
    730730                <label for="pass2"><?php _e( 'Confirm new password' ); ?></label><br />
    731                 <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
     731                <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" required/>
    732732        </p>
    733733
    734734        <p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
     
    823823        <form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
    824824        <p>
    825825                <label for="user_login"><?php _e( 'Username' ); ?><br />
    826                 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" /></label>
     826                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" required/></label>
    827827        </p>
    828828        <p>
    829829                <label for="user_email"><?php _e( 'Email' ); ?><br />
    830                 <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label>
     830                <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" required/></label>
    831831        </p>
    832832        <?php
    833833        /**
     
    10711071        <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    10721072        <p>
    10731073                <label for="user_login"><?php _e( 'Username or Email Address' ); ?><br />
    1074                 <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label>
     1074                <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" required/></label>
    10751075        </p>
    10761076        <p>
    10771077                <label for="user_pass"><?php _e( 'Password' ); ?><br />
    1078                 <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label>
     1078                <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" required/></label>
    10791079        </p>
    10801080        <?php
    10811081        /**