Accessibility: Administration: Improve aria-label on network admin Themes screen.

This ensures that the beginning of the label matches the visible link text.

Add a similar label for the plugin URI link on the Plugins screen when the plugin is outside of the directory.

Follow-up to [28673], [28706], [35924].

Props sabernhardt, zeo, audrasjb.
Fixes #24442.
Built from https://develop.svn.wordpress.org/trunk@51795


git-svn-id: http://core.svn.wordpress.org/trunk@51402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-09-10 14:49:00 +00:00
parent e175db4ae1
commit 018ad6098c
3 changed files with 7 additions and 3 deletions

View File

@ -721,7 +721,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
if ( $theme->get( 'ThemeURI' ) ) {
/* translators: %s: Theme name. */
$aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) );
$aria_label = sprintf( __( 'Visit theme site for %s' ), $theme->display( 'Name' ) );
$theme_meta[] = sprintf(
'<a href="%s" aria-label="%s">%s</a>',

View File

@ -1066,9 +1066,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
__( 'View details' )
);
} elseif ( ! empty( $plugin_data['PluginURI'] ) ) {
/* translators: %s: Plugin name. */
$aria_label = sprintf( __( 'Visit plugin site for %s' ), $plugin_name );
$plugin_meta[] = sprintf(
'<a href="%s">%s</a>',
'<a href="%s" aria-label="%s">%s</a>',
esc_url( $plugin_data['PluginURI'] ),
esc_attr( $aria_label ),
__( 'Visit plugin site' )
);
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51794';
$wp_version = '5.9-alpha-51795';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.