WordPress.org

Make WordPress Core

Changeset 50585 for trunk


Ignore:
Timestamp:
03/25/2021 08:19:57 PM (7 months ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php

    r50374 r50585  
    421421                    <span class="success" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
    422422                    <button type="button" class="privacy-text-copy button">
    423                         <?php _e( 'Copy suggested policy text to clipboard' ); ?>
     423                        <span aria-hidden="true"><?php _e( 'Copy suggested policy text to clipboard' ); ?></span>
    424424                        <span class="screen-reader-text">
    425425                            <?php
    426426                            /* translators: %s: Plugin name. */
    427                             sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name );
     427                            printf( __( 'Copy suggested policy text from %s.' ), $plugin_name );
    428428                            ?>
    429429                        </span>
Note: See TracChangeset for help on using the changeset viewer.