Make WordPress Core


Ignore:
Timestamp:
05/19/2022 03:52:03 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: List Tables: Hide the Comments column icon and title attribute from screen readers.

The element already has non-visual text, making the icon and the title attribute redundant for assistive technologies.

Follow-up to [22439], [27548], [31513], [32991], [50804].

Props sabernhardt, ryokuhi, afercia, karlgroves, SergeyBiryukov.
Fixes #55555. See #24766.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r53302 r53414  
    351351        if ( ! $this->detached ) {
    352352            $posts_columns['parent'] = _x( 'Uploaded to', 'column name' );
     353
    353354            if ( post_type_supports( 'attachment', 'comments' ) ) {
    354                 $posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
     355                $posts_columns['comments'] = sprintf(
     356                    '<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
     357                    esc_attr__( 'Comments' ),
     358                    __( 'Comments' )
     359                );
    355360            }
    356361        }
Note: See TracChangeset for help on using the changeset viewer.