Accessibility: Add "(opens in a new window)" screen reader text to the "News-Nearby Events" dashboard widget footer links.

- standardizes similar messages in core to always use `(opens in a new window)`
- adds translators comments
- hides the dashicons with `aria-hidden="true"`, see #40428

Fixes #40733.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-05-11 22:47:41 +00:00
parent 691d649329
commit 274596b8ef
8 changed files with 46 additions and 15 deletions

View File

@ -440,6 +440,12 @@
color: #ddd;
}
/* Safari 10 + VoiceOver specific: without this, the hidden text gets read out before the link. */
.community-events-footer .screen-reader-text {
height: inherit;
white-space: nowrap;
}
/* Dashboard WordPress news */
#dashboard_primary .inside {

File diff suppressed because one or more lines are too long

View File

@ -440,6 +440,12 @@
color: #ddd;
}
/* Safari 10 + VoiceOver specific: without this, the hidden text gets read out before the link. */
.community-events-footer .screen-reader-text {
height: inherit;
white-space: nowrap;
}
/* Dashboard WordPress news */
#dashboard_primary .inside {

File diff suppressed because one or more lines are too long

View File

@ -1125,22 +1125,40 @@ function wp_dashboard_events_news() {
</div>
<p class="community-events-footer">
<a href="https://make.wordpress.org/community/meetups-landing-page" target="_blank">
<?php _e( 'Meetups' ); ?> <span class="dashicons dashicons-external"></span>
</a>
<?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>',
'https://make.wordpress.org/community/meetups-landing-page',
__( 'Meetups' ),
/* translators: accessibility text */
__( '(opens in a new window)' )
);
?>
|
<a href="https://central.wordcamp.org/schedule/" target="_blank">
<?php _e( 'WordCamps' ); ?> <span class="dashicons dashicons-external"></span>
</a>
<?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>',
'https://central.wordcamp.org/schedule/',
__( 'WordCamps' ),
/* translators: accessibility text */
__( '(opens in a new window)' )
);
?>
|
<?php // translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. ?>
<a href="<?php _e( 'https://wordpress.org/news/' ); ?>" target="_blank">
<?php _e( 'News' ); ?> <span class="dashicons dashicons-external"></span>
</a>
<?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>',
/* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
esc_url( __( 'https://wordpress.org/news/' ) ),
__( 'News' ),
/* translators: accessibility text */
__( '(opens in a new window)' )
);
?>
</p>
<?php

View File

@ -58,7 +58,7 @@ if ( 'publish' == $post->post_status ) {
$preview_button = sprintf( '%1$s<span class="screen-reader-text"> %2$s</span>',
$preview_button_text,
/* translators: accessibility text */
__( '(link opens in a new window)' )
__( '(opens in a new window)' )
);
?>
<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview-<?php echo (int) $post->ID; ?>" id="post-preview"><?php echo $preview_button; ?></a>

View File

@ -4144,7 +4144,8 @@ final class WP_Customize_Manager {
__( 'CSS allows you to customize the appearance and layout of your site with code. Separate CSS is saved for each of your themes. In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.' ),
esc_url( __( 'https://codex.wordpress.org/CSS' ) ),
__( 'Learn more about CSS' ),
__( '(link opens in a new window)' )
/* translators: accessibility text */
__( '(opens in a new window)' )
),
) );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40642';
$wp_version = '4.8-alpha-40643';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.