Add 'for' attributes to labels in wp-login.php for extra accessibility. props ppaire, fixes #19178.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-11-06 20:03:30 +00:00
parent 8a96d9e6d0
commit b6a2aab635

View File

@ -402,7 +402,7 @@ case 'retrievepassword' :
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post"> <form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post">
<p> <p>
<label><?php _e('Username or E-mail:') ?><br /> <label for="user_login" ><?php _e('Username or E-mail:') ?><br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label> <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label>
</p> </p>
<?php do_action('lostpassword_form'); ?> <?php do_action('lostpassword_form'); ?>
@ -451,11 +451,11 @@ case 'rp' :
<input type="hidden" id="user_login" value="<?php echo esc_attr( $_GET['login'] ); ?>" autocomplete="off" /> <input type="hidden" id="user_login" value="<?php echo esc_attr( $_GET['login'] ); ?>" autocomplete="off" />
<p> <p>
<label><?php _e('New password') ?><br /> <label for="pass1"><?php _e('New password') ?><br />
<input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label> <input type="password" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" /></label>
</p> </p>
<p> <p>
<label><?php _e('Confirm new password') ?><br /> <label for="pass2"><?php _e('Confirm new password') ?><br />
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label> <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /></label>
</p> </p>
@ -508,11 +508,11 @@ case 'register' :
<form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post"> <form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
<p> <p>
<label><?php _e('Username') ?><br /> <label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label> <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
</p> </p>
<p> <p>
<label><?php _e('E-mail') ?><br /> <label for="user_email"><?php _e('E-mail') ?><br />
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" tabindex="20" /></label> <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" tabindex="20" /></label>
</p> </p>
<?php do_action('register_form'); ?> <?php do_action('register_form'); ?>
@ -628,15 +628,15 @@ default:
<form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post"> <form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post">
<p> <p>
<label><?php _e('Username') ?><br /> <label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label> <input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label>
</p> </p>
<p> <p>
<label><?php _e('Password') ?><br /> <label for="user_pass"><?php _e('Password') ?><br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p> </p>
<?php do_action('login_form'); ?> <?php do_action('login_form'); ?>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p> <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p>
<p class="submit"> <p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" /> <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />
<?php if ( $interim_login ) { ?> <?php if ( $interim_login ) { ?>