[wp-trac] [WordPress Trac] #52891: Privacy: print screen reader text message

WordPress Trac noreply at wordpress.org
Tue Mar 23 19:29:27 UTC 2021


#52891: Privacy: print screen reader text message
--------------------------+------------------------------------------------
 Reporter:  mukesh27      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.7.1
Component:  Privacy       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui, accessibility, administration
  needs-refresh           |
--------------------------+------------------------------------------------
Changes (by sabernhardt):

 * keywords:  has-patch => has-patch needs-refresh


Comment:

 After switching to `printf`, screen readers would speak both the visible
 text plus the intended screen reader text:
 "Copy suggested policy text to clipboard Copy suggested policy text from
 WordPress.   button"

 One way to fix the redundancy is wrapping the visible text with `<span
 aria-hidden="true"></span>`:

 {{{
         <button type="button" class="privacy-text-copy button">
                 <span aria-hidden="true"><?php _e( 'Copy suggested policy
 text to clipboard' ); ?></span>
                 <span class="screen-reader-text">
                         <?php
                         /* translators: %s: Plugin name. */
                         printf( __( 'Copy suggested policy text from %s.'
 ), $plugin_name );
                         ?>
                 </span>
         </button>
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52891#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list