Make WordPress Core

Changeset 51795


Ignore:
Timestamp:
09/10/2021 02:47:24 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r51735 r51795  
    722722        if ( $theme->get( 'ThemeURI' ) ) {
    723723            /* translators: %s: Theme name. */
    724             $aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) );
     724            $aria_label = sprintf( __( 'Visit theme site for %s' ), $theme->display( 'Name' ) );
    725725
    726726            $theme_meta[] = sprintf(
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r51678 r51795  
    10671067                        );
    10681068                    } elseif ( ! empty( $plugin_data['PluginURI'] ) ) {
     1069                        /* translators: %s: Plugin name. */
     1070                        $aria_label = sprintf( __( 'Visit plugin site for %s' ), $plugin_name );
     1071
    10691072                        $plugin_meta[] = sprintf(
    1070                             '<a href="%s">%s</a>',
     1073                            '<a href="%s" aria-label="%s">%s</a>',
    10711074                            esc_url( $plugin_data['PluginURI'] ),
     1075                            esc_attr( $aria_label ),
    10721076                            __( 'Visit plugin site' )
    10731077                        );
Note: See TracChangeset for help on using the changeset viewer.