Commit Graph

307 Commits

Author SHA1 Message Date
Jake Spurlock eb79d7f1ee Security: Add user interface to auto-update themes and plugins.
Building on core update mechanisms, this adds the ability to enable automatic updates for themes and plugins to the WordPress admin. 

Fixes: #50052.
Props: afercia, afragen, audrasjb, azaozz, bookdude13, davidperonne, desrosj, gmays, gmays, javiercasares, karmatosed, knutsp, mapk, mukesh27, netweb, nicolaskulka, nielsdeblaauw, paaljoachim, passoniate, pbiron, pedromendonca, whodunitagency, whyisjake, wpamitkumar, and xkon.


git-svn-id: https://develop.svn.wordpress.org/trunk@47835 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 18:47:24 +00:00
Andrea Fercia cdd8b92ea6 Accessibility: Media: Hide the invisible "file input" on media views from assistive technologies.
The file input button is visually hidden, but was announced by screen readers in workflows unrelated to file uploads.
It is now hidden from assistive technologies by the means of an `aria-hidden` attribute, as its CSS display property must not be changed to make sure it still works on old browsers.

See #49753.
Fixes #47611.


git-svn-id: https://develop.svn.wordpress.org/trunk@47834 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 13:31:32 +00:00
Sergey Biryukov 36e4db6b01 Media: Expose media grid frame via `wp-media-grid-ready` trigger for easier customization.
Props soulseekah.
Fixes #50185.

git-svn-id: https://develop.svn.wordpress.org/trunk@47807 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-16 17:23:31 +00:00
Dominik Schilling 3d31284c5e Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.

git-svn-id: https://develop.svn.wordpress.org/trunk@47771 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 20:13:38 +00:00
Sergey Biryukov d5df031e6f Privacy: Add an indication when the Copy action in Privacy Policy Guide is complete.
This adds a "Copied!" text near the "Copy this section to clipboard" button to provide direct feedback that the action was completed.

Props garrett-eclipse, nickylimjj, xkon, desrosj, birgire.
Fixes #44588.

git-svn-id: https://develop.svn.wordpress.org/trunk@47572 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-12 14:24:38 +00:00
Robert Anderson 251fd685dd Comments: Fix title not updating when replying to a comment
When replying to an existing comment, the comment form is moved to below the
existing comment with JS, but the form heading was not being updated. This
fixes the issue by introducing a new data-attribute to the reply link with the
correct heading string, and applying that string to the heading when the form
is moved.

Props isabel_brison, azaozz, peterwilsoncc.
Fixes #38009.


git-svn-id: https://develop.svn.wordpress.org/trunk@47506 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-25 04:53:06 +00:00
Sergey Biryukov 60f78cd845 Privacy: Prevent unexpected scrolling when clicking the "Copy this section to clipboard" button on Privacy Policy Guide screen.
Props garrett-eclipse, birgire, davidbaumwald, pbiron.
Fixes #49540.

git-svn-id: https://develop.svn.wordpress.org/trunk@47420 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-03 17:49:53 +00:00
John Blackbourn b20dd081ba Editor: Revert a fix for incorrect usage of ID attributes on custom fields.
This reverts [47222] due to compatibility issues with plugins which are using the `#poststuff` selector.

See #46964

git-svn-id: https://develop.svn.wordpress.org/trunk@47410 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-03 00:35:41 +00:00
Sergey Biryukov 5f23c79b1d Privacy: Make the progress indicator for export and erasure visible even if not hovered over.
Follow-up to [47246].

Props pbiron, garrett-eclipse.
Fixes #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47395 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-29 23:43:57 +00:00
Sergey Biryukov 196859f90f Customize: When a menu item is removed from the menu, uncheck its source item on the available items panel.
Props donmhico, garrett-eclipse, audrasjb.
Fixes #46830.

git-svn-id: https://develop.svn.wordpress.org/trunk@47356 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 11:12:18 +00:00
Sergey Biryukov c2316edc3a Coding Standards: Add missing braces to `if` conditions and use strict comparison in `js/_enqueues/wp/media/editor.js`.
Props ankitmaru.
Fixes #49317.

git-svn-id: https://develop.svn.wordpress.org/trunk@47349 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 08:56:44 +00:00
Sergey Biryukov 96f845d1a7 Menus: Restore the title of the currently active/expanded menu item when clicking "Cancel" after editing.
Other inputs are already restored to their previous values in that case.

Props Girishpanchal, nilamacharya, JoshuaWold, welcher, SergeyBiryukov.
Fixes #43031.

git-svn-id: https://develop.svn.wordpress.org/trunk@47294 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-16 06:25:54 +00:00
Andrea Fercia 5866986d74 Media: Fix bottom spacing on various Media Modal elements for non-webkit browsers.
Implementation of bottom padding in overflow content differs across browsers. See https://github.com/w3c/csswg-drafts/issues/129. To make bottom spacing consistent across browsers there's the need for an alternate CSS method.
- uses a CSS `after` pseudo element or simply a bottom margin to reserve some bottom spacing
- removes a couple leftovers from [40428]
- fixes an annoying visual glitch where the media modal content is visible behind the bottom toolbar border

Props sabernhardt, afercia.
See #40152.
Fixes #48378.


git-svn-id: https://develop.svn.wordpress.org/trunk@47266 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:30:13 +00:00
Sergey Biryukov f26d4d3735 Widgets: Prevent currently active wide widget controls from being partially covered by another widget's controls.
The currently active widget controls should always be displayed on top.

Props audrasjb, fervillz, rinkuyadav999, jaydeep23290, ashokrd2013, melchoyce, pento, westonruter, SergeyBiryukov.
Fixes #42001.

git-svn-id: https://develop.svn.wordpress.org/trunk@47263 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 15:24:47 +00:00
Anthony Burchell 08b3c1d123 Media: Reset aspect ratio constraints when width and height fields fail numeric validation.
Props TBschen, valentinbora.
Fixes #49073.


git-svn-id: https://develop.svn.wordpress.org/trunk@47262 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 04:38:55 +00:00
Sergey Biryukov 0c07311e95 Coding Standards: Fix JSHint issues in [47246].
See #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47248 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 21:36:53 +00:00
Sergey Biryukov a6a02eaca7 Privacy: Give progress indication for export and erasure.
This adds a progress indicator for "Download Personal Data" and "Erase Personal Data" row actions, which can take a while with a lot of data.

Props garrett-eclipse, allendav, dominic_ks, xkon, karmatosed, birgire.
Fixes #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47246 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 20:17:58 +00:00
Sergey Biryukov 023d4b2796 Administration: Capitalize `Trash` consistently in various messages and comments.
When used as a noun referring to the "virtual" place, `Trash` should be capitalized.

Props garrett-eclipse, aandrewdixon, Presskopp.
Fixes #45317.

git-svn-id: https://develop.svn.wordpress.org/trunk@47233 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 04:10:09 +00:00
Andrew Ozz 6fd606d236 Media: Ensure imgareaselect.js is not initialized twice for the same image. May happen when uploading an image into a post and then clicking on Edit Image.
Fixes #49262.

git-svn-id: https://develop.svn.wordpress.org/trunk@47229 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 02:52:12 +00:00
Joe Dolson 1d7cdbeab7 Editor: Fix incorrect usage of ID attributes on custom fields.
Repeated containers used for custom fields have duplicate ID attributes. Duplicate IDs are incorrect HTML, and will also cause unexpected results when trying to manipulate using JS. Duplicate IDs are changed to matching classes; CSS & JS updated to match. 

Props jankimoradiya, audrasjb, donmhico, afercia.
Fixes #46964.


git-svn-id: https://develop.svn.wordpress.org/trunk@47222 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-09 19:39:54 +00:00
Andrea Fercia 43fb40739d Accessibility: Media: Make the toolbar and inline uploader visual order always match the DOM order.
Depending on the specific media view, the media UI elements are placed in a
different visual order. This change makes sure their visual order always
matches the DOM order.

Propos syhc, audrasjb, afercia.
See #37188.
Fixes #48403.


git-svn-id: https://develop.svn.wordpress.org/trunk@47217 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-09 16:30:41 +00:00
Sergey Biryukov e72fff9cef Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.

git-svn-id: https://develop.svn.wordpress.org/trunk@47198 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-06 06:31:22 +00:00
Sergey Biryukov e876090344 TinyMCE: Remove duplicate keys and strings from `langs/wp-langs-en.js`.
Props david.binda.
Fixes #49359.

git-svn-id: https://develop.svn.wordpress.org/trunk@47172 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-04 16:41:46 +00:00
Sergey Biryukov 706daca6a3 Editor: Remove back-compat stub for Classic Editor's old distraction-free writing mode.
The original script was deprecated in [30338] and removed in [32677].

Props Presskopp, ketuchetan.
Fixes #39448.

git-svn-id: https://develop.svn.wordpress.org/trunk@47164 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-02 04:13:25 +00:00
Sergey Biryukov 54c6311c96 Accessibility: Text Changes: Use sentence case for the word `Error` in various error messages, instead of all caps.
Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.

Props afercia, ryokuhi, sabernhardt, garrett-eclipse.
See #47656, #43037, #42945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47156 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-01 21:36:44 +00:00
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Sergey Biryukov c9663d78cf Docs: Improve comments in `js/_enqueues/wp/revisions.js` per the documentation standards.
Props passoniate.
Fixes #49177.

git-svn-id: https://develop.svn.wordpress.org/trunk@47120 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:35:39 +00:00
Sergey Biryukov c1abc8203a Docs: Fix typo in a comment in `js/media/models/attachment.js`.
Props wptoolsdev.
Fixes #49303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47117 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-27 14:42:37 +00:00
Sergey Biryukov 1160c97303 Customize: Fix typo in `CustomHeader.prototype.initialize()` DocBlock in `src/js/_enqueues/wp/custom-header.js`.
Props ankitmaru.
Fixes #49301.

git-svn-id: https://develop.svn.wordpress.org/trunk@47116 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-27 14:32:00 +00:00
Andrew Ozz 9224e14e67 Privacy: Cleanup `.wp-policy-help` CSS remnants and add back-compat when hiding the tutorial content before copying.
Props garrett-eclipse.
Fixes #49282.

git-svn-id: https://develop.svn.wordpress.org/trunk@47112 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-26 23:00:54 +00:00
Sergey Biryukov ad2261bfdd I18N: Synchronize MediaElement.js translation strings with the currently bundled version.
Some strings were previously removed in [43345] and accidentally reintroduced in [44163].

Props ramiy.
Fixes #49249. See #42139, #37453.

git-svn-id: https://develop.svn.wordpress.org/trunk@47094 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-21 02:19:04 +00:00
Sergey Biryukov 0a6720af6b Coding Standards: Add missing braces to `if` conditions in `js/_enqueues/wp/customize/base.js`.
Props ankitmaru.
Fixes #49122.

git-svn-id: https://develop.svn.wordpress.org/trunk@47038 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-04 01:26:26 +00:00
Sergey Biryukov 10d4ad91b0 Site Health: Fix typo in a variable name in `js/_enqueues/admin/site-health.js`.
Props nickylimjj.
Fixes #49112.

git-svn-id: https://develop.svn.wordpress.org/trunk@47031 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:09:27 +00:00
Sergey Biryukov 83defdf556 Coding Standards: Move assignment out of condition in `js/media/controllers/library.js`.
Props ankitmaru.
Fixes #49108.

git-svn-id: https://develop.svn.wordpress.org/trunk@47030 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:05:29 +00:00
Sergey Biryukov aaee49fb63 Coding Standards: Move assignment out of condition in `js/media/views/settings.js`.
Props ankitmaru.
Fixes #49107.

git-svn-id: https://develop.svn.wordpress.org/trunk@47029 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:00:11 +00:00
Sergey Biryukov 7abc076e13 Shortcodes: Make sure `wp.shortcode.string()` accepts the `attrs` array keys in any order.
Props yale01, georgestephanis, adamsilverstein, zsusag, mircoraffinetti, SergeyBiryukov.
Fixes #36263.

git-svn-id: https://develop.svn.wordpress.org/trunk@47003 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-21 18:32:45 +00:00
Sergey Biryukov 38cfdae6e9 I18N: Make the minimum input length to start searching posts in the "Insert/edit link" modal localizable.
Props Toro_Unit, birgire, miyauchi, swissspidy, ocean90.
Fixes #44662.

git-svn-id: https://develop.svn.wordpress.org/trunk@46988 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-18 01:13:14 +00:00
Sergey Biryukov 49c6bc2a69 Coding Standards: Add missing braces to `if` conditions in `js/_enqueues/wp/util.js`.
Props ankitmaru.
Fixes #48980.

git-svn-id: https://develop.svn.wordpress.org/trunk@46960 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-15 08:43:42 +00:00
Andrew Ozz c85e33c28f Fixes in `admin-bar.js`:
- Silence errors when a node doesn't exist similarly to jQuery.
- Add "feature testing" and fallbacks for old browsers as this may run on the front-end.
- Improve inline docs.

Props dinhtungdu, azaozz.
Fixes #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46883 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-11 18:54:55 +00:00
Andrew Ozz 0566a2a5fb TinyMCE: remove CSS map reference from `/tinymce/skins/lightgray/skin.min.css`.
Props AlexHolsgrove.
Fixes #48577.

git-svn-id: https://develop.svn.wordpress.org/trunk@46879 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 18:31:46 +00:00
Sergey Biryukov 7ac5a9f003 Coding Standards: Fix WPCS and JSHint issues in [46872].
See #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46874 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 01:32:56 +00:00
Andrew Ozz 2133f8392e Fix the admin toolbar js when jQuery is not present and replace the jQuery based hoverIntent.js with a native implementation. Introduces the "hoverintent" (no dependencies) package.
Props dinhtungdu, audrasjb, azaozz.
Fixes #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46872 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 01:01:35 +00:00
Sergey Biryukov a03bb54546 Docs: Replace `@returns` tags in JS docs with `@return`.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead:
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46800 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 17:59:47 +00:00
Sergey Biryukov ea5bfe134f Docs: Add missing full stops to `@returns` tags in JS docs, per the documentation standards.
Props shital-patel, kalpshit.
Fixes #48305.

git-svn-id: https://develop.svn.wordpress.org/trunk@46799 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 16:55:01 +00:00
Andrea Fercia 82e352e412 Accessibility: Media: Add an `aria-pressed` attribute to active button within a button group.
The `aria-pressed` attribute communicates semantically the "active" state of buttons that otherwise only look "active".

Fixes #48355.


git-svn-id: https://develop.svn.wordpress.org/trunk@46748 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-18 22:21:26 +00:00
Andrea Fercia 72e66c100e Widgets: Avoid to move focus to the Image Widget "Insert from URL" field.
Fixes a bug after [45499], where the backbone view element isn't the input field any longer. Also, managing focus programmatically is often an assumption on a specific user flow and should generally be avoided, see #43169.

Props dufresnesteven.
See #43169.
Fixes #48588.


git-svn-id: https://develop.svn.wordpress.org/trunk@46745 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-18 16:21:37 +00:00
Sergey Biryukov 8781a41915 Docs: Update broken source code link in `imgAreaSelect` jQuery plugin.
Props mryoga, finchps.
See #48467.

git-svn-id: https://develop.svn.wordpress.org/trunk@46741 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-17 16:12:43 +00:00
Sergey Biryukov 7bb2a562a6 Docs: Correct spelling of "subclass" and "overridden" in various docblocks and error messages.
Props garrett-eclipse.
Fixes #48676.

git-svn-id: https://develop.svn.wordpress.org/trunk@46739 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-17 07:41:49 +00:00
Sergey Biryukov ae487b5f67 Comments: Check if comment form element exists before adding a key handler to detect the cmd/ctrl-enter key press.
Follow-up to [45790].

Props raamdev.
Fixes #48543. See #41545.

git-svn-id: https://develop.svn.wordpress.org/trunk@46700 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-11 11:49:29 +00:00
Jonathan Desrosiers 9d88dbac58 External Libraries: Revert [46634-46635].
On further investigation, Plupload changed it’s license to a non-GPL compatible license. The newest, GPL compatible version is being used already in Core.

Unprops desrosj.
See #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46638 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 17:07:42 +00:00
Jonathan Desrosiers 6d413590b7 Customize: Formally deprecate unused Customizer classes.
The `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` PHP classes and `wp.customize.Menus.NewMenuControl` JS class were deprecated in 4.9 through [42034] with the intention of removing them in 5.0. Since more time has passed than originally intended, this change leaves `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` to prevent any potential backwards compatibility issues, and formally deprecates them. The `wp.customize.Menus.NewMenuControl` JS class is removed.

Props weston.ruter, matthias-reuter, jrf.
Fixes #42364.

git-svn-id: https://develop.svn.wordpress.org/trunk@46637 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 16:46:55 +00:00
Jonathan Desrosiers 669e701a5b External Libraries: Update Plupload from 2.1.9 to 2.3.6.
This change also updates the MoxieJS dependency from 1.3.5 to 1.5.7, converts Plupload to a dependency in NPM, and integrates all relevant parts into the build process.

For a full list of upstream changes, see https://github.com/moxiecode/plupload/compare/v2.1.9...v2.3.6.

Props desrosj, hareesh-pillai.
Fixes #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46634 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 15:29:46 +00:00
John Blackbourn 669cefe587 Docs: Correct some incorrect docblock tags.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46623 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-31 17:49:12 +00:00
Jonathan Desrosiers d376fedd89 Ensure `svn:eol-style` is consistently set for all files.
See #42594.

git-svn-id: https://develop.svn.wordpress.org/trunk@46586 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-25 16:36:41 +00:00
Andrew Ozz 295acd4f95 Upload: Expand error codes to include all 5xx HTTP errors when retrying to create image sub-sizes. Some servers may be configured to set HTTP 508 or 504, or possibly other `5` errors.
Porps mikeschroder, azaozz.
Fixes #48379.

git-svn-id: https://develop.svn.wordpress.org/trunk@46566 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-21 22:42:02 +00:00
Andrea Fercia 6e133af382 Accessibility: Media: Improve the Media Modal spinner position after [46418].
Fixes #47138.


git-svn-id: https://develop.svn.wordpress.org/trunk@46549 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-15 16:45:08 +00:00
Andrew Ozz 329e042060 Uploads: Retry to post-process images after HTTP 500 and HTTP 502 errors.
Props mikeschroder, azaozz.
Fixes #47872.

git-svn-id: https://develop.svn.wordpress.org/trunk@46506 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-14 19:54:36 +00:00
Anthony Burchell dcb037fc3a Media: Adds Edit Image controller to Media Library `select` frame.
This adds the necessary state for `EditImage` views in the `select` frame and listeners for setting that view.

Props fblaser, w3rkjana, afercia, antpb.
See #48028.


git-svn-id: https://develop.svn.wordpress.org/trunk@46461 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-11 20:41:51 +00:00
Andrea Fercia fb0d0e20ab Accessibility: Media: Improve the logic to render the ARIA tabs markup after [46363].
Additionally checks for the "menu" and "router" state attributes to better determine when the ARIA tabs pattern markup is appropriate.

See #47149.


git-svn-id: https://develop.svn.wordpress.org/trunk@46438 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-08 17:05:53 +00:00
Adam Silverstein 4d44978e00 External Libraries: upgrade `mediaelement` to version 4.2.13.
Upgrade `mediaelement` to the latest version. Includes a variety of bug fixes made since the 4.2.6 release; see https://github.com/mediaelement/mediaelement/releases.

Props danieliser, Hareesh Pillai.
Fixes #46681.



git-svn-id: https://develop.svn.wordpress.org/trunk@46436 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-08 16:04:32 +00:00
Andrea Fercia 42ef147e5d Accessibility: Media: Improve the search media field labelling.
Visible `<label>` elements benefit all users. The `placeholder` attribute should not be used as a replacement for visible labels.
Instead, it's supposed to be used only for a short hint to aid users with data entry e.g. a sample value or a brief description of the expected format.

Screen readers may not announce a `placeholder` attribute at all. Other users may suffer from the lack of a visible label and a placeholder used as replacement, for example:

- users with cognitive disabilities may have trouble remembering what the filled field does
- speech recognition users cannot see the name they can speak to set focus on the field
- low-vision users with high text-size may not be able to see the whole placeholder even when it's visible, if its value is clipped by the edge of the input

Props anevins, audrasjb, karmatosed, azaozz, SergeyBiryukov, afercia.
See #40331.
Fixes #47138.


git-svn-id: https://develop.svn.wordpress.org/trunk@46418 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-07 12:41:50 +00:00
Jake Spurlock ed1a53588f Privacy: Ensure that sending email, and remove data follow the same user experience.
Both personal data request processes should follow the same convention.

Fixes: #43974.
Props: garrett-eclipse, kjellr, Kerfred, birgire, marybaum, SergeyBiryukov.




git-svn-id: https://develop.svn.wordpress.org/trunk@46412 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-06 06:54:13 +00:00
Sergey Biryukov 21de64fc34 Customize: Remove duplicate `attr_title` assignment in `api.Menus.MenuItemControl.renderContent()`.
See #47838.

git-svn-id: https://develop.svn.wordpress.org/trunk@46401 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 02:31:14 +00:00
Sergey Biryukov c3c0007121 Emoji: Revert [46393] pending test failure investigation.
See #46537.

git-svn-id: https://develop.svn.wordpress.org/trunk@46397 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-05 00:59:50 +00:00
Sergey Biryukov c411aad31b Emoji: Stop emoji replacement from happening inside CodeMirror instances, and clean up some logic in the `MutationObserver`.
Props pento, hirofumi2012, davidbaumwald.
Fixes #46537.

git-svn-id: https://develop.svn.wordpress.org/trunk@46393 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-04 23:28:22 +00:00
Dominik Schilling 0b3bc89aba Docs: Convert 'Block Editor' to lowercase.
Props garrett-eclipse.
Fixes #45634.

git-svn-id: https://develop.svn.wordpress.org/trunk@46386 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-04 20:11:20 +00:00
Andrew Ozz 5e0904cf67 Upload: Fix the method used to create image sub-sizes when uploading fails with a PHP fatal error. Use a custom header to send the new attachment post ID even in HTTP 500 responses instead of an upload reference sent by the client. Also add another cap check and remove the action when deleting an attachment post during a failed upload cleanup.
Props timothyblynjacobs, clorith, azaozz.
Fixes #48200.

git-svn-id: https://develop.svn.wordpress.org/trunk@46382 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-03 21:00:10 +00:00
Andrea Fercia 37cdffd3cc Accessibility: Media: Add more headings in the Media Modal.
Headings are the predominant mechanism for screen reader users to find information in a page. They also help all users to better identify the main sections of user interfaces.

- adds three new headings within the media modal 
- improves plural form translation for "item selected" by using `wp.i18n`
- horizontally centers the media modal menu in the responsive view

Props kjellr, karmatosed, melchoyce, afercia.
See #47149.
Fixes #47610.


git-svn-id: https://develop.svn.wordpress.org/trunk@46375 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-03 12:09:31 +00:00
Andrea Fercia 6013fa1240 Accessibility: Media: Use the ARIA tabs pattern for the media modal menus.
The ARIA tabs pattern improves interaction for keyboard and assistive technologies users.
It gives the menu items proper roles, and `aria-selected` allows users of assistive technologies to know which tab is currently selected.

Props audrasjb, afercia, joedolson, karmatosed, melchoyce.
See #47149.


git-svn-id: https://develop.svn.wordpress.org/trunk@46363 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-30 19:36:42 +00:00
Anthony Burchell 48564fa823 Media: Revert [46354] preventing bad clipping of text in image details page.
See #47115.


git-svn-id: https://develop.svn.wordpress.org/trunk@46355 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-30 17:11:14 +00:00
Anthony Burchell 32b7a5e076 Media: Prevents clipping of text when scaling image edit screen.
Props sabernhardt, audrasjb, afercia.
See #47115.


git-svn-id: https://develop.svn.wordpress.org/trunk@46354 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-30 16:33:39 +00:00
Jonathan Desrosiers 1504804b7c Upgrade/Install: Fix the Install Now button in the plugin overlay when running WordPress on a specific port.
Props garrett-eclipse, pierlo, afragen.
Fixes #48077.

git-svn-id: https://develop.svn.wordpress.org/trunk@46348 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-30 00:04:46 +00:00
Jake Spurlock 2ff8e68e15 Menus: Replace http with https in placeholders.
Encourage the use of https with the placeholder text in menus.

Fixes #46312
Props aksl95, audrasjb, celloexpressions, SergeyBiryukov, jorbin.


git-svn-id: https://develop.svn.wordpress.org/trunk@46330 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-26 20:30:59 +00:00
Andrea Fercia 8c8999d933 Media: Fix JavaScript TypeError after [45376].
Props desrosj, afercia.
Fixes #48021.


git-svn-id: https://develop.svn.wordpress.org/trunk@46321 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-26 13:05:19 +00:00
Sergey Biryukov a9fb2f6a38 Site Health: Introduce `site_status_test_result` filter for the output of a finished Site Health test.
Props Clorith.
Fixes #47864.

git-svn-id: https://develop.svn.wordpress.org/trunk@46269 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 20:03:15 +00:00
Sergey Biryukov 7ae0a5985f Privacy: Show a success message for personal data erasure.
Props garrett-eclipse, allendav, birgire, JoshuaWold, karmatosed, pputzer.
Fixes #44135.

git-svn-id: https://develop.svn.wordpress.org/trunk@46264 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 19:12:04 +00:00
Andrea Fercia 0ff03b3290 Login and Registration: Add a "Show password" button on the login page.
The ability for users to see the password they're typing improves usability and accessibility of the login users flow.

- brings the login screen in line with the same feature already used in the New User, Edit User, and Reset Password pages
- improves association of labels and input fields by using explicit association with `for` / `id` attributes
- slightly increases the "Remember me" label font size

Props johnbillion, Iceable, audrasjb, joyously, adamsilverstein, boemedia, DrewAPicture, shadyvb, birgire, peterwilsoncc, pento, anevins, davidbaumwald, whyisjake, afercia.
Fixes #42888.


git-svn-id: https://develop.svn.wordpress.org/trunk@46256 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:05:16 +00:00
Andrea Fercia aba005be39 Accessibility: Make sortable meta boxes non sortable when there are no locations they can be dragged to.
Depending on the amount of meta boxes and the layout settings under Screen Options, sortable meta boxes may not be actually sortable.
In these cases, jQuery UI sortable needs to be disabled and the user interface shouldn't use a CSS `cursor: move`.

The use of consistent and relevant cursors may be important for users who have a cognitive disability, since cursors give a visual clue as to an element's functionality. Using the move cursor for elements which cannot be moved may be confusing or counter-intuitive for users.

Props adamsilverstein, antpb, anevins.
Fixes #47131.


git-svn-id: https://develop.svn.wordpress.org/trunk@46250 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:29:46 +00:00
Andrea Fercia 42b5133a25 Accessibility: Menus: Improve the menu items "Select All".
- changes "Select All" from a link to a checkbox
- the new checkbox is available only when JavaScript support is on
- semantically and for accessibility, a checkbox is a better user interface control because the available action is clear to all users and the selected state is communicated natively
- it's consistent with the existing pattern for the admin tables

Props birgire, audrasjb, afercia.
Fixes #47048.


git-svn-id: https://develop.svn.wordpress.org/trunk@46240 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 12:41:14 +00:00
Andrea Fercia 01b18e824f Accessibility: Media: Make screen readers announce the Media search results.
- adds audible messages via `wp.a11y.speak()` to announce the search results 
- removes a `keyup` event that was there only to support old browsers 
- removes `aria-modal="true"` from the media modal dialog as it prevents the ARIA live regions to be perceived by screen readers
- triggers the search only after 2 ASCII characters have been typed

Props anevins, antpb, aduth, loreleiaurora, afercia.
Fixes #47146.


git-svn-id: https://develop.svn.wordpress.org/trunk@46239 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 12:18:53 +00:00
Jonathan Desrosiers a4e8fe2145 Site Health: Use sentence casing consistently in header tags.
Props SergeyBiryukov, ajayghaghretiya1, ronakganatra, mukesh27, Clorith.
Fixes #47298.

git-svn-id: https://develop.svn.wordpress.org/trunk@46199 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 17:25:38 +00:00
Andrew Ozz 20a17438d0 Uploads: add helper functions for setting, getting, and deleting the temp upload reference used to the attachment_id when retrying to make image sub-sizes.
See #47872.

git-svn-id: https://develop.svn.wordpress.org/trunk@46174 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 01:25:14 +00:00
Andrew Ozz 684f30fd7b TinyMCE: update to version 4.9.6. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt. Includes fix for the `Permission denied to access property "nodeType"` error.
Fixes #47437.

git-svn-id: https://develop.svn.wordpress.org/trunk@46173 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-19 00:59:59 +00:00
Adam Silverstein 823b0d2c64 External Libraries: Update Backbone.js to 1.4.0.
Upgrade Backbone to the latest stable version. Fix some issues in Media with `listenTo` which changed in this version, see https://backbonejs.org/#changelog.

Props desrosj, priyankkpatel, pierlo.
Fixes #47478.



git-svn-id: https://develop.svn.wordpress.org/trunk@46157 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-17 17:18:32 +00:00
Sergey Biryukov 4f2fc80f65 Site Health: Modify the grading indicator to remove percentage score in favor of a "Good" or "Should be improved" status.
This removes arbitrary confusion about what the numbers mean.

Props Clorith, hedgefield, Cybr, arena, DavidAnderson, earnjam, daveshine, Otto42, azaozz, asadkn, KARTHOST, tigertech, maximejobin, johnbillion, raboodesign, ramiy, afragen.
Fixes #47046.

git-svn-id: https://develop.svn.wordpress.org/trunk@46106 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-14 14:28:47 +00:00
Adam Silverstein 96b4b1a70d Login and Registration: reset password - ensure submit button disabled when field empty.
Fix an issue where the submit button was enabled with an empty password when the user previously checked "Confirm use of weak password" for a weak password, then cleared the password field.

Props henry.wright.
Fixes #47924.



git-svn-id: https://develop.svn.wordpress.org/trunk@46103 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-13 18:29:29 +00:00
Sergey Biryukov bc6f11decd External Libraries: Update jQuery Color plugin to 2.1.2.
Props desrosj, hareesh-pillai, lovememore.
Fixes #31511.

git-svn-id: https://develop.svn.wordpress.org/trunk@46095 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-12 12:40:38 +00:00
Andrew Ozz 275f9baeec Upload: Reset the temp upload reference in Plupload when the file is not an image.
See #47872.

git-svn-id: https://develop.svn.wordpress.org/trunk@46081 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-08 02:27:51 +00:00
Jake Spurlock c957e2573e Update wp.a11y.speak() to sanitize HTML before display.
Props iandunn, adamsilverstein, sstoqnov, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/trunk@45979 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 17:11:22 +00:00
Andrew Ozz 759ee944c6 Uploads: After an image is uploaded and PHP times out or runs out of memory during post-processing (the server response is HTTP 500 error), try to resize it three more times. Then, if all attempts fail, do a cleanup of any sub-sizes that may have been created and show an error message asking the user to scale the image and upload it again.
See #47872.

git-svn-id: https://develop.svn.wordpress.org/trunk@45934 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-04 01:10:57 +00:00
Andrea Fercia 425d6fd925 Accessibility: Add a default title for the media modal dialog.
Makes sure the media modal dialog `h1` heading isn't empty when custom media frames don't set a title. This is particularly important now that the media modal is an ARIA dialog, as the title is referenced by an `aria-labelledby` attribute to properly label the dialog.

Props donmhico, audrasjb.
Fixes #47612.


git-svn-id: https://develop.svn.wordpress.org/trunk@45925 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-01 15:17:37 +00:00
Sergey Biryukov 5377bc484b Comments: In AJAX response when deleting a comment, account for `&nbsp;` as a thousands separator in `total_items_i18n` and `total_pages_i18n` numbers.
Props denisco, SergeyBiryukov.
Fixes #47953.

git-svn-id: https://develop.svn.wordpress.org/trunk@45918 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-30 18:32:14 +00:00
Sergey Biryukov fb189a6d5c Customizer: Trim whitespace from custom link URLs.
This complements a similar fix for the Menus screen in [45655].

Props donmhico, audrasjb.
Fixes #47888. See #47723.

git-svn-id: https://develop.svn.wordpress.org/trunk@45869 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-21 00:26:45 +00:00
Sergey Biryukov 2fb748bd1c Docs: Update `@since` tag for new JS functions and variables introduced in [45572].
Props garrett-eclipse.
See #47145.

git-svn-id: https://develop.svn.wordpress.org/trunk@45867 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-20 22:53:50 +00:00
Sergey Biryukov 94f4dcd15a Plugins: Adjust the pause before running plugin search AJAX request on "Add Plugins" screen to allow more time for using browser's autocomplete.
Props donmhico, apermo.
Fixes #46021.

git-svn-id: https://develop.svn.wordpress.org/trunk@45793 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-14 02:01:26 +00:00
Sergey Biryukov e196360f8c Coding Standards: Fix JSHint error in [45790].
See #41545.

git-svn-id: https://develop.svn.wordpress.org/trunk@45792 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-14 00:01:40 +00:00
Adam Silverstein 98255d4720 Comments: enable typing cmd/ctrl-enter to submit comment forms.
Add a key handler on the comment form that detects the cmd/ctrl-enter key press and submits the comment form. 

Props xyfi, Lindstromer, helen, splitti.
Fixes #41545.



git-svn-id: https://develop.svn.wordpress.org/trunk@45790 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-13 21:25:57 +00:00
Gary Pendergast c645936163 Emoji: Upgrade Twemoji to 12.1.2.
This upgrade adds support for the transgender flag: 🏳️‍⚧️

There's some additional housekeeping in this commit:

- Twemoji recently rearranged their repository and package, so `Gruntfile.js` needed tweaking to allow for that.
- As only new files were added in this Twemoji release, the CDN version didn't need updating.

Fixes #47852.



git-svn-id: https://develop.svn.wordpress.org/trunk@45769 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-08 04:04:15 +00:00
Andrea Fercia b1ccaf8903 Accessibility: Improve the way emojis are announced by screen readers.
Adds an ARIA `role="img"` to the emojis markup in the front end. While the ARIA role is technically redundant, it helps Safari and VoiceOver to properly announce the emojis as "image". Without the role, they announce a generic "group" role.
Tested with Safari 12.1.1 / VoiceOver 9.

Props pento.
See #37486.


git-svn-id: https://develop.svn.wordpress.org/trunk@45726 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-03 11:52:51 +00:00
Tammie Lister c83f0b0d22 Media: Reduces the bulk media options to have one primary button
This fixes where 2 primary buttons were showing for bulk actions within media trash.

Props garrett-eclipse, afercia, ianbelanger, SergeyBiryukov
Fixes #46757, #46758


git-svn-id: https://develop.svn.wordpress.org/trunk@45701 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-30 23:19:18 +00:00
Sergey Biryukov 5618dfc6d3 Accessibility: Taxonomy: When a new category or tag is being added, show a spinner and noop the button to avoid multiple requests.
Props andg, afercia, guddu1315, SergeyBiryukov.
Fixes #47607.

git-svn-id: https://develop.svn.wordpress.org/trunk@45683 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-26 17:45:21 +00:00
Sergey Biryukov d758aa802d Code Editor: Check for correct `mode` value in `wp.codeEditor.initialize` to enable autocomplete support for PHP.
Props ediamin.
Fixes #47769.

git-svn-id: https://develop.svn.wordpress.org/trunk@45670 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 01:26:13 +00:00
Gary Pendergast 0b06e59940 Customizer: Show all widgets when the search field is cleared.
When clicking the clear button on the widget search field, the search results should refresh to show all widgets.

Props Mahesh901122.
Fixes #47534.


git-svn-id: https://develop.svn.wordpress.org/trunk@45658 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-18 05:54:10 +00:00
Sergey Biryukov 1570f89693 Comments: Fix typo in comment reply observer options.
Props maguiar.
Fixes #47706. See #46260.

git-svn-id: https://develop.svn.wordpress.org/trunk@45641 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 16:45:58 +00:00
Andrew Ozz a7041b951b TinyMCE: fix adding of too many undo levels for wpviews. The HTML changes several times when a wpview is added. We only want one undo level. Also fixes cases when the cursor is next to an embeddable URL in the Text tab and the user switches to the Visual tab.
See #45307.

git-svn-id: https://develop.svn.wordpress.org/trunk@45631 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 03:24:20 +00:00
Andrew Ozz 944595cb9d TinyMCE: fix flickering inline toolbar when showing a tooltip. Take two.
Fixes #44911.

git-svn-id: https://develop.svn.wordpress.org/trunk@45620 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 18:17:46 +00:00
Andrew Ozz e56d5d0d4c TinyMCE: fix flickering inline toolbar when hovering over the buttons there and the vertical scrollbar is not shown (the page height is less than the window height). Improves/removes the previous fix for similar flickering but only in RTL, see #42018.
Props joakimsilfverberg, mukesh27, kokers, Howdy_McGee, noisysocks, azaozz.
Fixes #44911.

git-svn-id: https://develop.svn.wordpress.org/trunk@45610 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 01:09:53 +00:00
Gary Pendergast 4503f93961 Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-includes`.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45590 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 23:41:16 +00:00
Andrea Fercia 66d9c7e491 Accessibility: Make the Media modal an ARIA modal dialog.
For a number of years, the Media modal missed an explicit ARIA role and the required attributes for modal dialogs.

This was confusing for assistive technology users, since they may not realize they're inside a dialog, and that consequently the keyboard interactions may be different from the rest of the page. Lack of an explicit label for the dialog was confusing as well, since assistive technology users didn't have an immediate sense of what the dialog is for.

This change makes the Media modal meet the ARIA Authoring Practices recommendations, helping users better understand the purpose and interactions with the modal. Also, it makes sure to hide the rest of the page content from assistive technologies, until support for `aria-modal="true"` improves.

Additionally:
- moves the modal H1 heading to the beginning of the modal content 
- changes the modal left menu position to make visual and DOM order match 
- improves the `wp.media.view.FocusManager` documentation

Fixes #47145.


git-svn-id: https://develop.svn.wordpress.org/trunk@45572 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 12:32:28 +00:00
Sergey Biryukov 115c496a9a Docs: Correct `@since` for `admin/edit-comments.js`, introduced in [3736].
See #47581.

git-svn-id: https://develop.svn.wordpress.org/trunk@45567 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-26 18:18:21 +00:00
Anton Timmermans 3099359887 Docs: Improve JSDoc for `media/views/attachment/details.js`.
Props maartenleenders, boblinthorst, dfangstrom.
Fixes #47588.


git-svn-id: https://develop.svn.wordpress.org/trunk@45561 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-22 13:01:22 +00:00
Anton Timmermans a912ef9642 Docs: Improve JSDoc for `admin/edit-comments.js`.
Props manuelaugustin, diedeexterkate, thulshof, Xyfi, ireneyoast.
Fixes #47581.


git-svn-id: https://develop.svn.wordpress.org/trunk@45558 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 14:44:30 +00:00
Adam Silverstein 0dc3295e29 Themes: improve search by trimming search string.
Fix an issue where searching installed themes for an empty string resulted in matching all themes.

Props afercia, desrosj, hesyifei, evalarumbe.
Fixes #39041.


git-svn-id: https://develop.svn.wordpress.org/trunk@45557 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 14:14:59 +00:00
Anton Timmermans 7a9af3a4ed Comments: Open comment quick edit on double click.
In [42767] the quick edit button changed from a link to a button. This caused the jQuery code that selects on a link to no longer work. This commit restores the previous behavior.

Fixes #47572.
See #43382, #38677.


git-svn-id: https://develop.svn.wordpress.org/trunk@45553 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-20 10:05:03 +00:00
Andrea Fercia 5eb394329a Accessibility: Handle one more case of focus loss when switching view in the Media Views.
See #43169.


git-svn-id: https://develop.svn.wordpress.org/trunk@45531 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-13 16:21:49 +00:00
Andrea Fercia 6551660d55 Accessibility: Improve focus management in the Media Views.
- keeps focus management only where necessary to avoid focus losses
- removes focus management where a specific user workflow was assumed
- makes the "Attachment Details" navigation buttons really disabled when there are no next or previous attachments
- adds inline comments to clarify all the usages of focus()

Fixes #43169.


git-svn-id: https://develop.svn.wordpress.org/trunk@45524 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-12 21:02:03 +00:00
Andrea Fercia 0ddaeb1ad2 Accessibility: Fix the order of the Previous, Next, and Close buttons in the Attachment Details modal.
Making the visual and DOM order match benefits keyboard users who navigate documents sequentially and expect the focus order to be consistent with the sequential reading order.

Fixes #47458.


git-svn-id: https://develop.svn.wordpress.org/trunk@45506 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-09 15:47:43 +00:00
Andrea Fercia 226dc75154 Accessibility: Improve accessibility of all the media views form controls.
- changes the media views form controls to have explicitly associated labels with for/id attributes
- adds a few missing labels / aria-labels
- improves a few existing labels / aria-labels
- improves semantics in a few places, by adding visually hidden headings, fieldset + legend elements, aria-describedby attributes
- improves the image custom size input fields and their labelling
- adds `role="status"` to the "saved" indicator so that status messages are announced to assistive technologies
- swaps the columns source order in the image details template, to make visual and DOM order match
- swaps the "Replace" and "Back" buttons source order in the Replace Image view, to make visual and DOM order match
- gallery settings: move checkbox label to the right: checkboxes are supposed to have labels on the right
- merge similar strings, unified to "Drop files to upload" (removed "Drop files here", and "Drop files anywhere to upload")
- makes the "upload-ui" consistent across the media views
- hides the IE 11 "X" `::-ms-clear` button in the Insert from URL field, as it conflicts with the uploading spinner
- adds comments to all the media templates to clarify their usage
- slightly increases vertical spacing between form fields in the media sidebar
- removes some CSS selectors introduced as backwards compatibility for WordPress pre-4.4
- removes some CSS still targeting Internet Explorer 7 and 8

Fixes #47141.
Fixes #47122.


git-svn-id: https://develop.svn.wordpress.org/trunk@45499 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-07 20:43:26 +00:00
Jonathan Desrosiers 383b620ced Privacy: Remove inline CSS within personal data request list tables.
The `.hidden` class can be used to show and hide UI elements instead.

Props birgire, pratikthink, garrett-eclipse.
Fixes #44839.

git-svn-id: https://develop.svn.wordpress.org/trunk@45490 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-04 23:39:31 +00:00
Andrew Ozz 9fcb362fa0 Privacy tools: Organize privacy functions into logical files and classes.
Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45448 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-26 20:49:04 +00:00
Andrea Fercia d013696652 Accessibility: Improve toggling the "Post locked" information visibility.
- effectively hides the "Post locked" information from assistive technologies
- when a post is locked, reveals the "Post locked" information without CSS animation
- the height CSS animation didn't work anyways after [24906]

See #24553.
Fixes #44946.


git-svn-id: https://develop.svn.wordpress.org/trunk@45417 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-25 17:14:29 +00:00
Andrea Fercia 1a1031b466 Accessibility: Improve the media views upload Dismiss Errors button.
- makes the Dismiss Errors button visible in the media views inline uploader
- avoids a focus loss when activating the Dismiss Errors button

See the related GitHub issue from the WPCampus accessibility audit https://github.com/WordPress/gutenberg/issues/15354

Fixes #47113.


git-svn-id: https://develop.svn.wordpress.org/trunk@45376 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-22 19:32:22 +00:00
Andrew Ozz 14066540c0 jQuery: bring jquery.js back into the WordPress SVN repo and backport the patch from 3.4.0.
Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@45342 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-17 04:24:44 +00:00
Andrew Ozz b202561a5f Update TinyMCE to 4.9.4. Changelog: https://github.com/tinymce/tinymce/blob/4.x/changelog.txt.
Fixes #47229 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@45316 602fd350-edb4-49c9-b593-d223f7449a82
2019-05-15 23:44:37 +00:00
Andrew Ozz 25bc196513 Site Health info tab: fix replacing the size strings in the copied info.
Props xkon.
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45241 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 04:50:45 +00:00
Andrew Ozz 288116c9ff Site Health info tab: Remove the "Directories and Sizes" section on Multisite installations. Most of the info shown there doesn't apply for multisite.
Props xkon, desrosj, azaozz.

git-svn-id: https://develop.svn.wordpress.org/trunk@45239 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-18 00:33:03 +00:00
Andrea Fercia 715a65c561 Accessibility: Make the Tags meta box better support Input Method Editor (IME) converters.
Also, restores the keyboard interaction behavior prior to [41988] by requesting one single Enter key press to add a tag.

Props ryanshoover, miyauchi.
Fixes #45371.


git-svn-id: https://develop.svn.wordpress.org/trunk@45227 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-17 07:17:26 +00:00
Andrew Ozz e85b26d14c Site health, info tab:
- Change `recurse_dirsize()` to accept an array of excluded paths.
- Change so we don't calculate the sizes of dirs in wp-content twice.
- Add the size in bytes to the "debug" into.
- Add a custom DOM event after the dir sizes request is done. Can be used by plugins to "daisy chain" more requests.
- Move "WordPress directory location" and "WordPress directory size" to the top in the "Directories and Sizes" section.
- Move "Theme directory location" to the "Active Theme" section.
- Fix labels capitalization.

Props xkon, afercia, Clorith, azaozz.
Fixes #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45220 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-16 23:01:45 +00:00
Andrea Fercia 92909607d6 Site health: Improve jQuery selectors so that they don't depend on a specific markup.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45198 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-14 14:29:03 +00:00
Andrea Fercia 5c9d27cd17 Coding standards: Site health: Avoid to use `var` in the middle of JavaScript function blocks.
Amends [45178].
See #46683.


git-svn-id: https://develop.svn.wordpress.org/trunk@45197 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-14 13:48:59 +00:00
Sergey Biryukov 936db1b0e1 Site Health: i18n audit, take 2.
* Use `wp.i18n` to translate JavaScript strings.
* Use `_n()` for proper plural forms support.

Props TimothyBlynJacobs, ocean90, afercia.
Fixes #46683.

git-svn-id: https://develop.svn.wordpress.org/trunk@45178 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 20:33:48 +00:00
Andrew Ozz 05981179e4 Site health: Load the "Info" tab immediately and notify the user while gathering site data. Changes the Info tab to work similarly to the Status tab: it does separate request to fetch the directories sizes and doesn't "block" the loading of the page.
Props xkon, afercia, Clorith, azaozz.
See #46707.

git-svn-id: https://develop.svn.wordpress.org/trunk@45176 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 19:23:13 +00:00
Andrew Ozz ac97906269 TinyMCE: Fix keyboard navigation when the `dfw` button is present but hidden. Ensure that button is added last in the DOM to match where it appears visually.
Props afercia, azaozz.
Fixes #46640.

git-svn-id: https://develop.svn.wordpress.org/trunk@45172 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-12 18:07:47 +00:00
Gary Pendergast 677c2a447b Media: Update the media bulk action labels for consistency.
Props ianbelanger, garrett-eclipse, afercia, Presskopp.
Fixes #44675.



git-svn-id: https://develop.svn.wordpress.org/trunk@45147 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-08 23:53:02 +00:00
Gary Pendergast 11e97aae1e Emoji: Update Twemoji to version 12.0.0.
Props pento, superpoincare.
Fixes #46404, #46805.


git-svn-id: https://develop.svn.wordpress.org/trunk@45134 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-08 05:21:49 +00:00
Sergey Biryukov 66e0c55818 Docs: Fix typo in a comment in `editor/dfw.js`.
Props garrett-eclipse, mattnyeus.
Fixes #46485.

git-svn-id: https://develop.svn.wordpress.org/trunk@45127 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-07 05:39:00 +00:00
Andrea Fercia 328c4f3432 Coding Standards: Clean up the Site Health stylesheet.
- reduces selectors specificity to avoid over-qualified selectors
- removes unused rulesets / properties
- renames some CSS classes

Fixes #46685.


git-svn-id: https://develop.svn.wordpress.org/trunk@45071 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-29 18:43:09 +00:00
Andrea Fercia f5a66cacba Accessibility: Remove arrows navigation from the Site Health accordions.
Arrows navigation on accordions is an optional keyboard interaction feature mentioned in the WAI-ARIA Authoring Practices. While it can add some value in some specific cases, it's not so discoverable and it's unlikely users, including assistive technologies users, would really "expect" this kind of interaction.

See #46573.
Fixes #46682.


git-svn-id: https://develop.svn.wordpress.org/trunk@45069 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-29 11:26:33 +00:00
Andrew Ozz 752f99c5df TinyMCE:
- Fix adding the keyboard shortcuts to all button tooltips in the classic editor and classic block.
- Fix translating the aria labels for all buttons.

Fixes #35710;

git-svn-id: https://develop.svn.wordpress.org/trunk@45066 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-29 00:48:31 +00:00
Sergey Biryukov b522f1ad8c Site Health: Declare `ClipboardJS` global to fix JSHint issue.
See #46647.

git-svn-id: https://develop.svn.wordpress.org/trunk@45055 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-28 18:37:17 +00:00
Gary Pendergast 1ab6f67ef5 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45044 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 22:30:26 +00:00
Andrea Fercia 368016feb2 Accessibility: Simplify the Site Health score indicator.
The Site Health score indicator isn't exactly a "progress bar" and shouldn't use ARIA roles and properties related to progress bars. Also, some browser / screen reader combinations don't announce the score properly.
- removes any ARIA
- adds a screen-reader-text "Current health score:"
- adds `role="img" aria-hidden="true" focusable="false"` to the SVG
- reduces CSS specificity simplifying unnecessary overqualified selectors
- fixes the syntax for ::after and ::before (double colon)

Fixes #46621.


git-svn-id: https://develop.svn.wordpress.org/trunk@45041 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-27 20:38:07 +00:00
Andrea Fercia c2fd19e12d Admin: Site Health JavaScript minor clean-up.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/trunk@44988 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 16:38:48 +00:00
Gary Pendergast dad6b61cfb Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.


git-svn-id: https://develop.svn.wordpress.org/trunk@44986 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-23 03:54:16 +00:00
Adam Silverstein e1a070bb87 Media: introduce a "Heading" view for improved accessibility.
* Add a new media view: `wp.media.view.Heading` designed to add accessibility friendly headers in the media library/modal.
* Add an initial "Attachments list" heading above the attachments list.

Props afercia.
Fixes #36925.


git-svn-id: https://develop.svn.wordpress.org/trunk@44969 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 21:04:49 +00:00
Andrea Fercia 01b2c8e34b Accessibility: Improve the Comments and Privacy count text.
- standardizes the Comment count string to `%s Comment in moderation', '%s Comments in moderation` so it can be bulk-updated
- adds the string as visually hidden text in the admin menu 
- introduces an `updateInModerationText` JS simple function, responsible to correctly update all the related text using the data from the AJAX response
- adds a visually hidden text "1 Privacy Policy update" to the Privacy menu items count
- adds/improves translators comments

Changes that apply to all the count bubbles (Updates, plugins, etc.)
- makes the bubbles and their text slightly bigger
- improves the active menu item bubble contrast by changing the background color to red (option 2 in the screenshot attached in a previous comment)

Props adamsoucie, afercia.
Fixes #33030.


git-svn-id: https://develop.svn.wordpress.org/trunk@44924 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-18 15:21:17 +00:00
Andrew Ozz 353bfb5e7a TinyMCE: fix the TinyMCE help modal keyboard shortcut on Mac for the classic editor and classic block.
Fixes #45791.

git-svn-id: https://develop.svn.wordpress.org/trunk@44913 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-15 21:42:48 +00:00
Andrew Ozz d5820a5324 TinyMCE: remove the reference to `skin.min.css.map` from `skin.min.css`. Fixes an unneeded 404 request.
Fixes #46533.

git-svn-id: https://develop.svn.wordpress.org/trunk@44911 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-15 19:31:42 +00:00
Andrea Fercia 026abd4bc6 Accessibility: improve the "URL" and "Alt text" fields in the media modals.
Many users found the attachment URL field confusing: it says "URL" so it may appear like a field meant to paste a URL into.
Also, the Alt text field is the most important one in terms of content, while the Title field needs to be de-emphasized.

- changes the URL field label to "Copy link"
- moves the alt text field to the top as first field 
- avoids to set initial focus on the alt text field 
- adds an explanatory text with a link pointing to the W3C "alt decision tree" tutorial 
- adds `aria-describedby` to target the explanatory text
- adjusts the CSS accordingly
- updates the QUnit index.html file

Props melchoyce, audrasjb, afercia.
Fixes #41612.


git-svn-id: https://develop.svn.wordpress.org/trunk@44900 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-15 10:42:35 +00:00
Andrea Fercia 45faac902d Accessibility: Improve the placeholder "prompt" text in the post title and Quick Draft widget.
Old browsers didn't support the HTML placeholder attribute. For a number of years, `<label>` elements have been used in a few places in WordPress to emulate placeholders. It's time to improve semantics and interaction, use real placeholders when possible, and clean up some JavaScript.

- Quick Draft widget: it now uses visible `<label>` elements and a real `placeholder` attribute 
- removes the related JavaScript
- Post title:
  - keeps the "prompt" label for backwards compatibility
  - improves the JavaScript to make the "prompt" label stay visible on focus and disappear when typing, like real placeholder do
- changes the post "prompt" text from "Enter title here" to "Add title" for consistency with the Block Editor 
- cleans-up some CSS

Props Cheffheid, afercia.
Fixes #42390.


git-svn-id: https://develop.svn.wordpress.org/trunk@44896 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-14 17:38:36 +00:00