From 9131d74641c4c857a1bc0a7de8a7b3abfdc561f3 Mon Sep 17 00:00:00 2001 From: joedolson Date: Thu, 31 Mar 2022 17:13:01 +0000 Subject: [PATCH] Login and Registration: Add autocomplete attributes. Set valid autocomplete attributes for registration and login fields for username, email, and current password. Autocomplete values are required in WCAG 2.1 at level AA for login forms. Props johnjamesjacoby, dhanendran, rianrietveld, joedolson, peterwilsoncc. Fixes #41136. Built from https://develop.svn.wordpress.org/trunk@53041 git-svn-id: http://core.svn.wordpress.org/trunk@52630 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 ++-- wp-includes/version.php | 2 +- wp-login.php | 10 +++++----- wp-signup.php | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 8b286ddb20..0af520ca0b 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -586,7 +586,7 @@ function wp_login_form( $args = array() ) { sprintf( '

- +

', esc_attr( $args['id_username'] ), esc_html( $args['label_username'] ), @@ -595,7 +595,7 @@ function wp_login_form( $args = array() ) { sprintf( '

- +

', esc_attr( $args['id_password'] ), esc_html( $args['label_password'] ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 2f1a1b692a..55d397a0d8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53040'; +$wp_version = '6.0-alpha-53041'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index c0abcb077a..45c207d81a 100644 --- a/wp-login.php +++ b/wp-login.php @@ -827,7 +827,7 @@ switch ( $action ) {

- +

" method="post" novalidate="novalidate">

- +

- +

" method="post">

- class="input" value="" size="20" autocapitalize="off" /> + class="input" value="" size="20" autocapitalize="off" autocomplete="username" />

- class="input password-input" value="" size="20" /> + class="input password-input" value="" size="20" autocomplete="current-password" /> diff --git a/wp-signup.php b/wp-signup.php index b6fdb5013c..99b128d827 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -118,10 +118,10 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { } if ( ! is_subdomain_install() ) { - echo '' . $current_network->domain . $current_network->path . '
'; + echo '' . $current_network->domain . $current_network->path . '
'; } else { $site_domain = preg_replace( '|^www\.|', '', $current_network->domain ); - echo '.' . esc_html( $site_domain ) . '
'; + echo '.' . esc_html( $site_domain ) . '
'; } if ( ! is_user_logged_in() ) { @@ -149,7 +149,7 @@ function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {

'; + echo ''; ?> ' . $errmsg . '

'; } - echo '
'; + echo '
'; _e( '(Must be at least 4 characters, letters and numbers only.)' ); ?> @@ -271,7 +271,7 @@ function show_user_form( $user_name = '', $user_email = '', $errors = '' ) { ?>

-
+
get_error_message( 'generic' ); if ( $errmsg ) {