Skip to content

Commit de06111

Browse files
committed
Comments: Remove aria-hidden="true" attribute for visible text in comment template.
This changeset removes `aria-hidden="true"` attribute used for required fields in comments template, for better accessibility. It removes the attribute from both `wp_required_field_indicator()` and `wp_required_field_message()` patterns. Follow-up to [53888]. Props juliemoynat, audrasjb, joedolson, sabernhardt, afercia, costdev. Fixes #55717. git-svn-id: https://develop.svn.wordpress.org/trunk@54136 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4fc5f0e commit de06111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/general-template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5024,7 +5024,7 @@ function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs
50245024
function wp_required_field_indicator() {
50255025
/* translators: Character to identify required form fields. */
50265026
$glyph = __( '*' );
5027-
$indicator = '<span class="required" aria-hidden="true">' . esc_html( $glyph ) . '</span>';
5027+
$indicator = '<span class="required">' . esc_html( $glyph ) . '</span>';
50285028

50295029
return $indicator;
50305030
}
@@ -5038,7 +5038,7 @@ function wp_required_field_indicator() {
50385038
*/
50395039
function wp_required_field_message() {
50405040
$message = sprintf(
5041-
'<span class="required-field-message" aria-hidden="true">%s</span>',
5041+
'<span class="required-field-message">%s</span>',
50425042
/* translators: %s: Asterisk symbol (*). */
50435043
sprintf( __( 'Required fields are marked %s' ), wp_required_field_indicator() )
50445044
);

0 commit comments

Comments
 (0)