From c2fbb4950dfa9868ef54028318ccb982e6d25938 Mon Sep 17 00:00:00 2001 From: davidbaumwald Date: Fri, 24 Jun 2022 21:26:12 +0000 Subject: [PATCH] Comments: Add contextual `autocomplete` attributes to comment form fields. For accessibility, input fields should identify their "purpose". The HTML5 attribute `autocomplete` allows for various user data to be quickly autofilled while adding context for some assistive technologies. This commit adds the appropriate autofill purposes for an author's name, email, and website URL in the comment form template. Props juliemoynat, bhrugesh96, sabernhardt. Fixes #55779. Built from https://develop.svn.wordpress.org/trunk@53576 git-svn-id: http://core.svn.wordpress.org/trunk@53165 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 9572333f27..fcbd51c894 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -2371,7 +2371,7 @@ function comment_form( $args = array(), $post_id = null ) { ( $req ? $required_indicator : '' ) ), sprintf( - '', + '', esc_attr( $commenter['comment_author'] ), ( $req ? $required_attribute : '' ) ) @@ -2384,7 +2384,7 @@ function comment_form( $args = array(), $post_id = null ) { ( $req ? $required_indicator : '' ) ), sprintf( - '', + '', ( $html5 ? 'type="email"' : 'type="text"' ), esc_attr( $commenter['comment_author_email'] ), ( $req ? $required_attribute : '' ) @@ -2397,7 +2397,7 @@ function comment_form( $args = array(), $post_id = null ) { __( 'Website' ) ), sprintf( - '', + '', ( $html5 ? 'type="url"' : 'type="text"' ), esc_attr( $commenter['comment_author_url'] ) ) diff --git a/wp-includes/version.php b/wp-includes/version.php index d40a2aaee1..c2bbebc40e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53575'; +$wp_version = '6.1-alpha-53576'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.