wp/wp-admin/includes/class-wp-theme-install-list-table.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/class-wp-theme-install-list-table.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-admin/includes/class-wp-theme-install-list-table.php	Fri Sep 05 18:52:52 2025 +0200
@@ -60,7 +60,7 @@
 		if ( 'search' === $tab ) {
 			$tabs['search'] = __( 'Search Results' );
 		}
-		$tabs['upload']   = __( 'Upload' );
+		$tabs['upload']   = _x( 'Upload', 'noun' );
 		$tabs['featured'] = _x( 'Featured', 'themes' );
 		//$tabs['popular']  = _x( 'Popular', 'themes' );
 		$tabs['new']     = _x( 'Latest', 'themes' );
@@ -230,6 +230,9 @@
 	}
 
 	/**
+	 * Generates the list table rows.
+	 *
+	 * @since 3.1.0
 	 */
 	public function display_rows() {
 		$themes = $this->items;
@@ -312,7 +315,7 @@
 		switch ( $status ) {
 			case 'update_available':
 				$actions[] = sprintf(
-					'<a class="install-now" href="%s" title="%s">%s</a>',
+					'<a class="install-now" href="%s" aria-label="%s">%s</a>',
 					esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ),
 					/* translators: %s: Theme version. */
 					esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ),
@@ -322,15 +325,14 @@
 			case 'newer_installed':
 			case 'latest_installed':
 				$actions[] = sprintf(
-					'<span class="install-now" title="%s">%s</span>',
-					esc_attr__( 'This theme is already installed and is up to date' ),
+					'<span class="install-now">%s</span>',
 					_x( 'Installed', 'theme' )
 				);
 				break;
 			case 'install':
 			default:
 				$actions[] = sprintf(
-					'<a class="install-now" href="%s" title="%s">%s</a>',
+					'<a class="install-now" href="%s" aria-label="%s">%s</a>',
 					esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ),
 					/* translators: %s: Theme name. */
 					esc_attr( sprintf( _x( 'Install %s', 'theme' ), $name ) ),
@@ -340,10 +342,9 @@
 		}
 
 		$actions[] = sprintf(
-			'<a class="install-theme-preview" href="%s" title="%s">%s</a>',
+			'<a class="install-theme-preview" href="%s" aria-label="%s">%s</a>',
 			esc_url( $preview_url ),
-			/* translators: %s: Theme name. */
-			esc_attr( sprintf( __( 'Preview %s' ), $name ) ),
+			esc_attr( $preview_title ),
 			__( 'Preview' )
 		);
 
@@ -360,7 +361,7 @@
 		$actions = apply_filters( 'theme_install_actions', $actions, $theme );
 
 		?>
-		<a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
+		<a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" aria-label="<?php echo esc_attr( $preview_title ); ?>">
 			<img src="<?php echo esc_url( $theme->screenshot_url . '?ver=' . $theme->version ); ?>" width="150" alt="" />
 		</a>
 
@@ -471,7 +472,7 @@
 		switch ( $status ) {
 			case 'update_available':
 				printf(
-					'<a class="theme-install button button-primary" href="%s" title="%s">%s</a>',
+					'<a class="theme-install button button-primary" href="%s" aria-label="%s">%s</a>',
 					esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ),
 					/* translators: %s: Theme version. */
 					esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ),
@@ -481,8 +482,7 @@
 			case 'newer_installed':
 			case 'latest_installed':
 				printf(
-					'<span class="theme-install" title="%s">%s</span>',
-					esc_attr__( 'This theme is already installed and is up to date' ),
+					'<span class="theme-install">%s</span>',
 					_x( 'Installed', 'theme' )
 				);
 				break;