Make WordPress Core

Changeset 25011


Ignore:
Timestamp:
08/07/2013 01:43:17 PM (12 years ago)
Author:
westi
Message:

Restore the for/id attributes in the post password for as they are necessary for accessibility tools. Fixes #18729.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r25010 r25011  
    12331233function get_the_password_form( $post = 0 ) {
    12341234    $post = get_post( $post );
     1235    $label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
    12351236    $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
    12361237    <p>' . __( 'This post is password protected. To view it please enter your password below:' ) . '</p>
    1237     <p><label>' . __( 'Password:' ) . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
     1238    <p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
    12381239    </form>
    12391240    ';
Note: See TracChangeset for help on using the changeset viewer.