From a844db32e2d9ed4312cc37d7c994d9e079921840 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 13 Apr 2017 22:41:50 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/meta-boxes.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 23ca2473f6..ba43c7dbda 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -50,10 +50,16 @@ function post_submit_meta_box( $post, $args = array() ) { post_status ) { - $preview_button = __( 'Preview Changes' ); + $preview_button_text = __( 'Preview Changes' ); } else { - $preview_button = __( 'Preview' ); + $preview_button_text = __( 'Preview' ); } + +$preview_button = sprintf( '%1$s %2$s', + $preview_button_text, + /* translators: accessibility text */ + __( '(link opens in a new window)' ) +); ?>