I18n: Improve the use of dashicons-external icon for external links.

This changeset modifies how the `dashicons-external` icon is used in external links by editing its styles and adding a space between the text and the icon 
for better accessibility.

Props SergeyBiryukov, afercia, isabel_brison, mukesh27, sabernhardt, oglekler, audrasjb.
Fixes #47303.



Built from https://develop.svn.wordpress.org/trunk@56211


git-svn-id: http://core.svn.wordpress.org/trunk@55723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-07-11 12:59:25 +00:00
parent 3eec0065e3
commit 897d9c221e
8 changed files with 28 additions and 18 deletions

View File

@ -139,6 +139,11 @@
height: auto; /* Fixes a Safari+VoiceOver bug, see ticket #42006 */
}
.screen-reader-text + .dashicons-external {
margin-top: -1px;
margin-right: 2px;
}
.screen-reader-shortcut {
position: absolute;
top: -1000em;

File diff suppressed because one or more lines are too long

View File

@ -138,6 +138,11 @@
height: auto; /* Fixes a Safari+VoiceOver bug, see ticket #42006 */
}
.screen-reader-text + .dashicons-external {
margin-top: -1px;
margin-left: 2px;
}
.screen-reader-shortcut {
position: absolute;
top: -1000em;

File diff suppressed because one or more lines are too long

View File

@ -746,7 +746,7 @@ class WP_Site_Health {
)
),
'actions' => sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
esc_url( wp_get_update_php_url() ),
__( 'Learn more about updating PHP' ),
/* translators: Hidden accessibility text. */
@ -894,7 +894,7 @@ class WP_Site_Health {
esc_url( __( 'https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions' ) ),
'target="_blank" rel="noopener"',
sprintf(
' <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span>',
'<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span>',
/* translators: Hidden accessibility text. */
__( '(opens in a new tab)' )
)
@ -1218,7 +1218,7 @@ class WP_Site_Health {
__( 'The SQL server is a required piece of software for the database WordPress uses to store all your site&#8217;s content and settings.' )
),
'actions' => sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
/* translators: Localized version of WordPress requirements if one exists. */
esc_url( __( 'https://wordpress.org/about/requirements/' ) ),
__( 'Learn more about what WordPress requires to run.' ),
@ -1458,7 +1458,7 @@ class WP_Site_Health {
);
$result['actions'] = sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
/* translators: Localized Support reference. */
esc_url( __( 'https://wordpress.org/support/forums/' ) ),
__( 'Get help resolving this issue.' ),
@ -1496,7 +1496,7 @@ class WP_Site_Health {
__( 'Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be available on a publicly available website.' )
),
'actions' => sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
/* translators: Documentation explaining debugging in WordPress. */
esc_url( __( 'https://wordpress.org/documentation/article/debugging-in-wordpress/' ) ),
__( 'Learn more about debugging in WordPress.' ),
@ -2478,7 +2478,7 @@ class WP_Site_Health {
);
} else {
$result['actions'] .= sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
__( 'https://developer.wordpress.org/rest-api/frequently-asked-questions/#why-is-authentication-not-working' ),
__( 'Learn how to configure the Authorization header.' ),
/* translators: Hidden accessibility text. */
@ -2511,7 +2511,7 @@ class WP_Site_Health {
'status' => 'good',
'label' => '',
'actions' => sprintf(
'<p><a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
__( 'https://wordpress.org/documentation/article/optimization/#Caching' ),
__( 'Learn more about page cache' ),
/* translators: Hidden accessibility text. */
@ -2637,7 +2637,7 @@ class WP_Site_Health {
__( 'A persistent object cache makes your site&#8217;s database more efficient, resulting in faster load times because WordPress can retrieve your site&#8217;s content and settings much more quickly.' )
),
'actions' => sprintf(
'<p><a href="%s" target="_blank" rel="noopener">%s <span class="screen-reader-text">%s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
'<p><a href="%s" target="_blank" rel="noopener">%s<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a></p>',
esc_url( $action_url ),
__( 'Learn more about persistent object caching.' ),
/* translators: Hidden accessibility text. */

View File

@ -1298,7 +1298,7 @@ function wp_dashboard_events_news() {
<p class="community-events-footer">
<?php
printf(
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'https://make.wordpress.org/community/meetups-landing-page',
__( 'Meetups' ),
/* translators: Hidden accessibility text. */
@ -1310,7 +1310,7 @@ function wp_dashboard_events_news() {
<?php
printf(
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'https://central.wordcamp.org/schedule/',
__( 'WordCamps' ),
/* translators: Hidden accessibility text. */
@ -1322,7 +1322,7 @@ function wp_dashboard_events_news() {
<?php
printf(
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
/* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
esc_url( _x( 'https://wordpress.org/news/', 'Events and News dashboard widget' ) ),
__( 'News' ),
@ -1648,7 +1648,7 @@ function wp_dashboard_quota() {
number_format_i18n( $quota )
);
printf(
'<a href="%1$s">%2$s <span class="screen-reader-text">(%3$s)</span></a>',
'<a href="%1$s">%2$s<span class="screen-reader-text"> (%3$s)</span></a>',
esc_url( admin_url( 'upload.php' ) ),
$text,
/* translators: Hidden accessibility text. */
@ -1664,7 +1664,7 @@ function wp_dashboard_quota() {
$percentused
);
printf(
'<a href="%1$s" class="musublink">%2$s <span class="screen-reader-text">(%3$s)</span></a>',
'<a href="%1$s" class="musublink">%2$s<span class="screen-reader-text"> (%3$s)</span></a>',
esc_url( admin_url( 'upload.php' ) ),
$text,
/* translators: Hidden accessibility text. */
@ -1895,7 +1895,7 @@ function wp_dashboard_php_nag() {
<p class="button-container">
<?php
printf(
'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
esc_url( wp_get_update_php_url() ),
__( 'Learn more about updating PHP' ),
/* translators: Hidden accessibility text. */

View File

@ -8239,7 +8239,7 @@ function wp_direct_php_update_button() {
echo '<p class="button-container">';
printf(
'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener">%2$s<span class="screen-reader-text"> %3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
esc_url( $direct_update_url ),
__( 'Update PHP' ),
/* translators: Hidden accessibility text. */

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-beta3-56210';
$wp_version = '6.3-beta3-56211';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.