Skip to content

Commit ef55bd4

Browse files
committed
Administration: Remove aria-label on post titles.
The `aria-label` on post titles in list tables changes the accessible name from `{post_title}` to `"{post_title}" (Edit)`. This change increases verbosity for screen readers and creates a mismatch between the visual text and the accessible name for voice command. Remove the extraneous `aria-label`. Props afercia, rianrietveld, iworks, muddassirnasim, joedolson. Fixes #33002. git-svn-id: https://develop.svn.wordpress.org/trunk@61738 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 17d91f6 commit ef55bd4

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/wp-admin/includes/class-wp-media-list-table.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,8 @@ public function column_title( $post ) {
490490

491491
if ( current_user_can( 'edit_post', $post->ID ) && ! $this->is_trash ) {
492492
$link_start = sprintf(
493-
'<a href="%s" aria-label="%s">',
493+
'<a href="%s">',
494494
get_edit_post_link( $post->ID ),
495-
/* translators: %s: Attachment title. */
496-
esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) )
497495
);
498496
$link_end = '</a>';
499497
}

src/wp-admin/includes/class-wp-posts-list-table.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,10 +1138,8 @@ public function column_title( $post ) {
11381138

11391139
if ( $can_edit_post && 'trash' !== $post->post_status ) {
11401140
printf(
1141-
'<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
1141+
'<a class="row-title" href="%s">%s%s</a>',
11421142
get_edit_post_link( $post->ID ),
1143-
/* translators: %s: Post title. */
1144-
esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $title ) ),
11451143
$pad,
11461144
$title
11471145
);

0 commit comments

Comments
 (0)