[wp-trac] [WordPress Trac] #46647: Site Health: Improve the "Copy to Clipboard" button

WordPress Trac noreply at wordpress.org
Wed Mar 27 22:30:33 UTC 2019


#46647: Site Health: Improve the "Copy to Clipboard" button
---------------------------------------+----------------------------
 Reporter:  pento                      |       Owner:  pento
     Type:  defect (bug)               |      Status:  closed
 Priority:  normal                     |   Milestone:  5.2
Component:  Administration             |     Version:
 Severity:  normal                     |  Resolution:  fixed
 Keywords:  has-patch has-screenshots  |     Focuses:  accessibility
---------------------------------------+----------------------------
Changes (by pento):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45044" 45044]:
 {{{
 #!CommitTicketReference repository="" revision="45044"
 Site Health: Improve the "Copy to clipboard" button.

 The previous method for copying the debug report to the clipboard involved
 having a hidden `<textarea>`, but this shows up in screen readers and
 can't be reliably hidden.

 To work around this, the button now uses the `clipboard.js` library, which
 automatically handles browser differences in the Clipboard API, and can
 load the text to copy from a `data-` attribute on the button.

 Props pento, hedgefield, afercia.
 Fixes #46647.
 }}}

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


More information about the wp-trac mailing list