From fb2e65d2b9e087aec0b29c5367a85d127837c20e Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Mon, 26 Feb 2018 20:49:13 +0000
Subject: [PATCH] Comments: Remove unnecessary `aria-required` attribute from
`comment_form()`, added with the function in [12810].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.
Props lakenh, afercia, davidakennedy, henry.wright.
Fixes #39045.
git-svn-id: https://develop.svn.wordpress.org/trunk@42758 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-includes/comment-template.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
index 0687d7e71d..5795362c3f 100644
--- a/src/wp-includes/comment-template.php
+++ b/src/wp-includes/comment-template.php
@@ -2258,14 +2258,13 @@ function comment_form( $args = array(), $post_id = null ) {
}
$req = get_option( 'require_name_email' );
- $aria_req = ( $req ? " aria-required='true'" : '' );
$html_req = ( $req ? " required='required'" : '' );
$html5 = 'html5' === $args['format'];
$fields = array(
'author' => '',
+ '
',
'email' => '',
+ '',
'url' => '',
);
@@ -2282,7 +2281,7 @@ function comment_form( $args = array(), $post_id = null ) {
$fields = apply_filters( 'comment_form_default_fields', $fields );
$defaults = array(
'fields' => $fields,
- 'comment_field' => '',
+ 'comment_field' => '',
/** This filter is documented in wp-includes/link-template.php */
'must_log_in' => '' . sprintf(
/* translators: %s: login URL */