Make WordPress Core

Changeset 54136


Ignore:
Timestamp:
09/12/2022 09:50:57 PM (2 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r53904 r54136  
    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;
     
    50395039function 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() )
Note: See TracChangeset for help on using the changeset viewer.