Privacy: Print screen reader text for the "Copy suggested policy text..." action button.

This change switches out `sprintf` for `printf` on the "Copy suggested policy text from..." button screen reader text.  Also, wrap the actual button text in a `<span aria-hidden="true">` to prevent both the button text and the screen reader text from being spoken.

Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes #52891.
Built from https://develop.svn.wordpress.org/trunk@50585


git-svn-id: http://core.svn.wordpress.org/trunk@50198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
davidbaumwald 2021-03-25 20:21:04 +00:00
parent bf267e05ca
commit 9b8c498eea
2 changed files with 3 additions and 3 deletions

View File

@ -420,11 +420,11 @@ final class WP_Privacy_Policy_Content {
<div class="privacy-settings-accordion-actions">
<span class="success" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
<button type="button" class="privacy-text-copy button">
<?php _e( 'Copy suggested policy text to clipboard' ); ?>
<span aria-hidden="true"><?php _e( 'Copy suggested policy text to clipboard' ); ?></span>
<span class="screen-reader-text">
<?php
/* translators: %s: Plugin name. */
sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name );
printf( __( 'Copy suggested policy text from %s.' ), $plugin_name );
?>
</span>
</button>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50583';
$wp_version = '5.8-alpha-50585';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.