From 33e8be09766835110e2388c1b8d50ef6adbf4bfd Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 29 Mar 2022 19:55:32 +0000 Subject: [PATCH] Customizer: Accessibility fixes following [53024]. This changeset fixes a few issues spotted after [53024]. - Remove target blank on HelpHub link - Remove duplicate information in `aria-label` - Small i18n fixes Follow-up to [53024]. Props joedolson, audrasjb, pbiron. Fixes #54939. git-svn-id: https://develop.svn.wordpress.org/trunk@53025 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 1469d42762..7ac0a3760c 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -1154,7 +1154,6 @@ function wp_default_scripts( $scripts ) { $scripts->add( 'customize-models', '/wp-includes/js/customize-models.js', array( 'underscore', 'backbone' ), false, 1 ); $scripts->add( 'customize-views', '/wp-includes/js/customize-views.js', array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 ); $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util', 'jquery-ui-core' ), false, 1 ); - $switch_to_site_editor_label = __( 'Use Site Editor' ); did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', @@ -1223,15 +1222,13 @@ function wp_default_scripts( $scripts ) { 'invalidDate' => __( 'Invalid date.' ), 'invalidValue' => __( 'Invalid value.' ), 'blockThemeNotification' => sprintf( - /* translators: 1. %s: URL to the localized version of https://wordpress.org/support/article/site-editor/, 2: HTML Button. */ - __( 'Hurray! Your theme supports Full Site Editing with blocks. Tell me more. %2$s' ), + /* translators: 1: Link to Site Editor documentation on HelpHub, 2: HTML button. */ + __( 'Hurray! Your theme supports Full Site Editing with blocks. Tell me more. %2$s' ), __( 'https://wordpress.org/support/article/site-editor/' ), sprintf( - /* translators: 1: URL to the Site Editor admin screen, 2: Button label, 3: Button text. */ - '', + '', esc_url( admin_url( 'site-editor.php' ) ), - $switch_to_site_editor_label, - $switch_to_site_editor_label + __( 'Use Site Editor' ) ) ), )