Make WordPress Core

Ticket #54344: 54344.1.diff

File 54344.1.diff, 3.0 KB (added by sabernhardt, 3 years ago)

refreshed, with aria-describedby for the URL prefix and suffix

  • src/wp-signup.php

     
    118118        }
    119119
    120120        if ( ! is_subdomain_install() ) {
    121                 echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" /><br />';
     121                echo '<span class="prefix_address" id="prefix-address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" required="required" aria-describedby="prefix-address" /><br />';
    122122        } else {
    123123                $site_domain = preg_replace( '|^www\.|', '', $current_network->domain );
    124                 echo '<input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" /><span class="suffix_address">.' . esc_html( $site_domain ) . '</span><br />';
     124                echo '<input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" autocomplete="off" required="required" aria-describedby="suffix-address" /><span class="suffix_address" id="suffix-address">.' . esc_html( $site_domain ) . '</span><br />';
    125125        }
    126126
    127127        if ( ! is_user_logged_in() ) {
     
    149149                <p class="error"><?php echo $errmsg; ?></p>
    150150                <?php
    151151        }
    152         echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" autocomplete="off" />';
     152        echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" autocomplete="off" required="required" />';
    153153        ?>
    154154
    155155        <?php
     
    260260        if ( $errmsg ) {
    261261                echo '<p class="error">' . $errmsg . '</p>';
    262262        }
    263         echo '<input name="user_name" type="text" id="user_name" value="' . esc_attr( $user_name ) . '" autocapitalize="none" autocorrect="off" maxlength="60" autocomplete="username" /><br />';
     263        echo '<input name="user_name" type="text" id="user_name" value="' . esc_attr( $user_name ) . '" autocapitalize="none" autocorrect="off" maxlength="60" autocomplete="username" required="required" /><br />';
    264264        _e( '(Must be at least 4 characters, letters and numbers only.)' );
    265265        ?>
    266266
     
    271271                ?>
    272272                <p class="error"><?php echo $errmsg; ?></p>
    273273        <?php } ?>
    274         <input name="user_email" type="email" id="user_email" value="<?php echo esc_attr( $user_email ); ?>" maxlength="200" autocomplete="email" /><br /><?php _e( 'Your registration email is sent to this address. (Double-check your email address before continuing.)' ); ?>
     274        <input name="user_email" type="email" id="user_email" value="<?php echo esc_attr( $user_email ); ?>" maxlength="200" autocomplete="email" required="required" /><br /><?php _e( 'Your registration email is sent to this address. (Double-check your email address before continuing.)' ); ?>
    275275        <?php
    276276        $errmsg = $errors->get_error_message( 'generic' );
    277277        if ( $errmsg ) {