WordPress.org

Make WordPress Core

Changeset 45044 for trunk/package.json


Ignore:
Timestamp:
03/27/2019 10:30:26 PM (13 months ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package.json

    r44960 r45044  
    9595        "@wordpress/wordcount": "2.2.0",
    9696        "backbone": "1.3.3",
     97        "clipboard": "2.0.4",
    9798        "element-closest": "^2.0.2",
    9899        "formdata-polyfill": "3.0.13",
Note: See TracChangeset for help on using the changeset viewer.