Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld. Fixes #40185. git-svn-id: https://develop.svn.wordpress.org/trunk@40422 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11d450f47e
commit
a844db32e2
@ -50,10 +50,16 @@ function post_submit_meta_box( $post, $args = array() ) {
|
|||||||
<?php
|
<?php
|
||||||
$preview_link = esc_url( get_preview_post_link( $post ) );
|
$preview_link = esc_url( get_preview_post_link( $post ) );
|
||||||
if ( 'publish' == $post->post_status ) {
|
if ( 'publish' == $post->post_status ) {
|
||||||
$preview_button = __( 'Preview Changes' );
|
$preview_button_text = __( 'Preview Changes' );
|
||||||
} else {
|
} else {
|
||||||
$preview_button = __( 'Preview' );
|
$preview_button_text = __( 'Preview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$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)' )
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<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>
|
<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>
|
||||||
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
||||||
|
Loading…
Reference in New Issue
Block a user