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. Built from https://develop.svn.wordpress.org/trunk@53414 git-svn-id: http://core.svn.wordpress.org/trunk@53003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
08c5dbc7e9
commit
4b46629139
|
@ -350,8 +350,13 @@ class WP_Media_List_Table extends WP_List_Table {
|
||||||
/* translators: Column name. */
|
/* translators: Column name. */
|
||||||
if ( ! $this->detached ) {
|
if ( ! $this->detached ) {
|
||||||
$posts_columns['parent'] = _x( 'Uploaded to', 'column name' );
|
$posts_columns['parent'] = _x( 'Uploaded to', 'column name' );
|
||||||
|
|
||||||
if ( post_type_supports( 'attachment', 'comments' ) ) {
|
if ( post_type_supports( 'attachment', 'comments' ) ) {
|
||||||
$posts_columns['comments'] = '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>';
|
$posts_columns['comments'] = sprintf(
|
||||||
|
'<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
|
||||||
|
esc_attr__( 'Comments' ),
|
||||||
|
__( 'Comments' )
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -691,7 +691,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||||
&& ! in_array( $post_status, array( 'pending', 'draft', 'future' ), true )
|
&& ! in_array( $post_status, array( 'pending', 'draft', 'future' ), true )
|
||||||
) {
|
) {
|
||||||
$posts_columns['comments'] = sprintf(
|
$posts_columns['comments'] = sprintf(
|
||||||
'<span class="vers comment-grey-bubble" title="%1$s"><span class="screen-reader-text">%2$s</span></span>',
|
'<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
|
||||||
esc_attr__( 'Comments' ),
|
esc_attr__( 'Comments' ),
|
||||||
__( 'Comments' )
|
__( 'Comments' )
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-alpha-53413';
|
$wp_version = '6.1-alpha-53414';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue