From 5ca727b87a3ab42069f9b36907063b25b54c164e Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Tue, 21 Jan 2025 03:09:24 -0600 Subject: [PATCH] Use ARIA label or remove title --- .../class-wp-theme-install-list-table.php | 19 ++++++++----------- .../includes/class-wp-themes-list-table.php | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/includes/class-wp-theme-install-list-table.php b/src/wp-admin/includes/class-wp-theme-install-list-table.php index bf2d2fb34d36a..7e00005ba4372 100644 --- a/src/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/src/wp-admin/includes/class-wp-theme-install-list-table.php @@ -315,7 +315,7 @@ public function single_row( $theme ) { switch ( $status ) { case 'update_available': $actions[] = sprintf( - '%s', + '%s', esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ), /* translators: %s: Theme version. */ esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), @@ -325,15 +325,14 @@ public function single_row( $theme ) { case 'newer_installed': case 'latest_installed': $actions[] = sprintf( - '%s', - esc_attr__( 'This theme is already installed and is up to date' ), + '%s', _x( 'Installed', 'theme' ) ); break; case 'install': default: $actions[] = sprintf( - '%s', + '%s', esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ), /* translators: %s: Theme name. */ esc_attr( sprintf( _x( 'Install %s', 'theme' ), $name ) ), @@ -343,10 +342,9 @@ public function single_row( $theme ) { } $actions[] = sprintf( - '%s', + '%s', esc_url( $preview_url ), - /* translators: %s: Theme name. */ - esc_attr( sprintf( __( 'Preview %s' ), $name ) ), + esc_attr( $preview_title ), __( 'Preview' ) ); @@ -363,7 +361,7 @@ public function single_row( $theme ) { $actions = apply_filters( 'theme_install_actions', $actions, $theme ); ?> - + @@ -474,7 +472,7 @@ public function install_theme_info( $theme ) { switch ( $status ) { case 'update_available': printf( - '%s', + '%s', esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ), /* translators: %s: Theme version. */ esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), @@ -484,8 +482,7 @@ public function install_theme_info( $theme ) { case 'newer_installed': case 'latest_installed': printf( - '%s', - esc_attr__( 'This theme is already installed and is up to date' ), + '%s', _x( 'Installed', 'theme' ) ); break; diff --git a/src/wp-admin/includes/class-wp-themes-list-table.php b/src/wp-admin/includes/class-wp-themes-list-table.php index 53b34e93f99b7..b17fb912d26dc 100644 --- a/src/wp-admin/includes/class-wp-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-themes-list-table.php @@ -211,7 +211,7 @@ public function display_rows() { $actions = array(); $actions['activate'] = sprintf( - '%s', + '%s', $activate_link, /* translators: %s: Theme name. */ esc_attr( sprintf( _x( 'Activate “%s”', 'theme' ), $title ) ),