Make WordPress Core


Ignore:
Timestamp:
04/13/2017 10:41:50 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.

Props rianrietveld.
Fixes #40185.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r40032 r40422  
    5151$preview_link = esc_url( get_preview_post_link( $post ) );
    5252if ( 'publish' == $post->post_status ) {
    53     $preview_button = __( 'Preview Changes' );
     53    $preview_button_text = __( 'Preview Changes' );
    5454} else {
    55     $preview_button = __( 'Preview' );
    56 }
     55    $preview_button_text = __( 'Preview' );
     56}
     57
     58$preview_button = sprintf( '%1$s<span class="screen-reader-text"> %2$s</span>',
     59    $preview_button_text,
     60    /* translators: accessibility text */
     61    __( '(link opens in a new window)' )
     62);
    5763?>
    5864<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>
Note: See TracChangeset for help on using the changeset viewer.