Commit Graph

17419 Commits

Author SHA1 Message Date
Sergey Biryukov
a2577854e6 Site Health: Declare ClipboardJS global to fix JSHint issue.
See #46647.
Built from https://develop.svn.wordpress.org/trunk@45055


git-svn-id: http://core.svn.wordpress.org/trunk@44864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 18:38:51 +00:00
Sergey Biryukov
774ac73a1f CSS Coding Standards: Use unitless values for line-height in wp-admin/css/widgets.css.
Props ianbelanger, audrasjb.
Fixes #46531. See #44643.
Built from https://develop.svn.wordpress.org/trunk@45053


git-svn-id: http://core.svn.wordpress.org/trunk@44862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 16:39:51 +00:00
Sergey Biryukov
a02494a80f Site Health: Add description for a successful HTTPS check.
Props Clorith, xkon.
Fixes #46617.
Built from https://develop.svn.wordpress.org/trunk@45052


git-svn-id: http://core.svn.wordpress.org/trunk@44861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 16:15:51 +00:00
Sergey Biryukov
e2115d62b6 Site Health: Use a consistent wording and response code for capability checks.
Props mukesh27 for initial patch.
Fixes #46691.
Built from https://develop.svn.wordpress.org/trunk@45050


git-svn-id: http://core.svn.wordpress.org/trunk@44859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 15:11:51 +00:00
Sergey Biryukov
d69165bd3b Site Health: Correct wp_version_check() existence verification by performing a request to the Site Health page instead of Dashboard.
Props Clorith, audrasjb.
Fixes #46616.
Built from https://develop.svn.wordpress.org/trunk@45049


git-svn-id: http://core.svn.wordpress.org/trunk@44858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-28 14:31:51 +00:00
Gary Pendergast
0a4d431e11 Upgrades: Allow upgrades to proceed when a soft failure occurs on package signatures.
In particular, this allows downgrading from WordPress 5.2 to 5.1.1, if sites wish to opt out of the beta.

Props dd32.
See #46615.


Built from https://develop.svn.wordpress.org/trunk@45046


git-svn-id: http://core.svn.wordpress.org/trunk@44855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 23:05:54 +00:00
Gary Pendergast
65f7cdbce0 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.


Built from https://develop.svn.wordpress.org/trunk@45044


git-svn-id: http://core.svn.wordpress.org/trunk@44853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 22:31:52 +00:00
Sergey Biryukov
179c2ea230 Plugins: Disable "Update Now" button for plugins that require a higher version of PHP or WordPress.
This complements disabling the "Install Now" button in [43436].

Props afragen.
Fixes #46677. See #43986.
Built from https://develop.svn.wordpress.org/trunk@45043


git-svn-id: http://core.svn.wordpress.org/trunk@44852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 22:11:53 +00:00
Andrea Fercia
9b15549b1c 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.

Built from https://develop.svn.wordpress.org/trunk@45041


git-svn-id: http://core.svn.wordpress.org/trunk@44850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 20:39:51 +00:00
Sergey Biryukov
7807324652 Taxonomy: Initialize $noparents variable in wp_ajax_add_tag() to avoid a notice with compact() in PHP 7.3.
Props pilou69.
Fixes #46670.
Built from https://develop.svn.wordpress.org/trunk@45034


git-svn-id: http://core.svn.wordpress.org/trunk@44843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 15:33:52 +00:00
Sergey Biryukov
b2e3f517e1 Database: Use wp_die() instead of die() in wp_check_mysql_version(), for more flexibility and consistency with other error messages in core.
Props spacedmonkey.
Fixes #45975.
Built from https://develop.svn.wordpress.org/trunk@45030


git-svn-id: http://core.svn.wordpress.org/trunk@44839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 14:03:51 +00:00
Sergey Biryukov
6be19e0dab Site Health: Update "Passed tests" button label to match both expanded and collapsed state.
Add `aria-controls` to declare what ID is being toggled.

Props Clorith, afercia.
Fixes #46663. See #46573.
Built from https://develop.svn.wordpress.org/trunk@45026


git-svn-id: http://core.svn.wordpress.org/trunk@44835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 02:57:51 +00:00
Sergey Biryukov
6037e5ab5e Plugins: Use correct singular for "Drop-in" in plugins list table.
Props tobifjellner, mukesh27.
Fixes #46592.
Built from https://develop.svn.wordpress.org/trunk@45021


git-svn-id: http://core.svn.wordpress.org/trunk@44830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 00:00:50 +00:00
Andrea Fercia
a668866f05 Admin: Site Health JavaScript minor clean-up.
See #46573.

Built from https://develop.svn.wordpress.org/trunk@44988


git-svn-id: http://core.svn.wordpress.org/trunk@44819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 16:39:52 +00:00
Sergey Biryukov
8ea4da0826 Privacy: Update default privacy policy text to match the current behavior of setting a temporary cookie on visiting the login page.
Props mechter, subrataemfluence, garrett-eclipse.
Fixes #44175.
Built from https://develop.svn.wordpress.org/trunk@44987


git-svn-id: http://core.svn.wordpress.org/trunk@44818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 10:54:53 +00:00
Gary Pendergast
0a9d61ab63 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.

Built from https://develop.svn.wordpress.org/trunk@44986


git-svn-id: http://core.svn.wordpress.org/trunk@44817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 03:55:53 +00:00
Sergey Biryukov
50bb3c689f Plugins: Remove wp_is_wp_compatible() and wp_is_php_compatible() functions added in [44978] for now, to discuss use cases and better naming.
See #46599, #43992.
Built from https://develop.svn.wordpress.org/trunk@44981


git-svn-id: http://core.svn.wordpress.org/trunk@44812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 13:00:52 +00:00
Sergey Biryukov
79e9aa9ed6 Plugins: Use <em> instead of <span> for PHP annotation in wp_plugin_update_row(), for consistency with other instances.
Props afragen.
Fixes #46598. See #43987.
Built from https://develop.svn.wordpress.org/trunk@44980


git-svn-id: http://core.svn.wordpress.org/trunk@44811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:08:51 +00:00
Sergey Biryukov
8954465943 PHPCS: Fix WPCS violations in [44978].
See #43992.
Built from https://develop.svn.wordpress.org/trunk@44979


git-svn-id: http://core.svn.wordpress.org/trunk@44810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:00:52 +00:00
Sergey Biryukov
75a3e484ec Plugins: Block plugin activation if it requires a higher version of PHP or WordPress.
Introduce `validate_plugin_requirements()` for validating a plugin's WordPress and PHP version requirements.

Introduce `wp_is_wp_compatible()` and `wp_is_php_compatible()` for checking compatibility with the current WordPress or PHP version.

Props afragen, joyously, DrewAPicture, TimothyBlynJacobs, desrosj, flixos90, SergeyBiryukov.
See #43992.
Built from https://develop.svn.wordpress.org/trunk@44978


git-svn-id: http://core.svn.wordpress.org/trunk@44809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 00:37:50 +00:00
desrosj
36af5473be Networks and Sites: Introduce the ms_user_list_site_class filter.
In the network admin user table on multisite installs (`WP_MS_Users_List_Table`), this filter allows the classes for the `<span>` tag surrounding each site link to be modified.

Props kraftbj, flixos90, johnjamesjacoby.
Fixes #41146.
Built from https://develop.svn.wordpress.org/trunk@44977


git-svn-id: http://core.svn.wordpress.org/trunk@44808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 23:55:51 +00:00
Sergey Biryukov
8dcd3a09a8 I18N: Move the strings for default user roles to wp-includes/capabilities.php, to make the translations available on the front end as well.
Props keraweb, ocean90.
Fixes #37539.
Built from https://develop.svn.wordpress.org/trunk@44976


git-svn-id: http://core.svn.wordpress.org/trunk@44807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:23:52 +00:00
Sergey Biryukov
30491f2410 Customize: Add a link to theme reviews in the theme details modal in the Customizer and on Add Themes screen.
Props celloexpressions, Travel_girl, Ixium, marco-peralta, dd32.
Fixes #36612.
Built from https://develop.svn.wordpress.org/trunk@44975


git-svn-id: http://core.svn.wordpress.org/trunk@44806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:02:51 +00:00
Felix Arntz
3a77265148 Bootstrap/Load: Introduce a recovery mode for fixing fatal errors.
Using the new fatal handler introduced in [44962], an email is sent to the admin when a fatal error occurs. This email includes a secret link to enter recovery mode. When clicked, the link will be validated and on success a cookie will be placed on the client, enabling recovery mode for that user. This functionality is executed early before plugins and themes are loaded, in order to be unaffected by potential fatal errors these might be causing.

When in recovery mode, broken plugins and themes will be paused for that client, so that they are able to access the admin backend despite of these errors. They are notified about the broken extensions and the errors caused, and can then decide whether they would like to temporarily deactivate the extension or fix the problem and resume the extension.

A link in the admin bar allows the client to exit recovery mode.

Props timothyblynjacobs, afragen, flixos90, nerrad, miss_jwo, schlessera, spacedmonkey, swissspidy.
Fixes #46130, #44458.

Built from https://develop.svn.wordpress.org/trunk@44973


git-svn-id: http://core.svn.wordpress.org/trunk@44804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:53:51 +00:00
Sergey Biryukov
5299c763ca Privacy: Use a consistent URL for Privacy Policy guide.
Props garrett-eclipse, mukesh27, birgire, desrosj.
Fixes #44876.
Built from https://develop.svn.wordpress.org/trunk@44971


git-svn-id: http://core.svn.wordpress.org/trunk@44802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:17:50 +00:00
Sergey Biryukov
1fc763e85e Users: Introduce users_have_additional_content filter to indicate whether the users being deleted have additional content associated with them outside of the post_author and link_owner relationships.
Props garrett-eclipse, xkon, birgire.
Fixes #36860.
Built from https://develop.svn.wordpress.org/trunk@44967


git-svn-id: http://core.svn.wordpress.org/trunk@44798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 20:12:50 +00:00
Sergey Biryukov
7d74080b80 Privacy: Introduce Privacy Policy page helpers:
* `is_privacy_policy()` template tag
* `privacy-policy.php` template
* `.privacy-policy` body class
* `.menu-item-privacy-policy` menu item class

Props garrett-eclipse, birgire, xkon, Clorith.
Fixes #44005.
Built from https://develop.svn.wordpress.org/trunk@44966


git-svn-id: http://core.svn.wordpress.org/trunk@44797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 19:48:50 +00:00
Andrea Fercia
03bd75f053 Upgrade/Install: Add missing opening curly bracket after [44513].
Props WebFactory.
Fixes #46563.

Built from https://develop.svn.wordpress.org/trunk@44964


git-svn-id: http://core.svn.wordpress.org/trunk@44795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 18:03:51 +00:00
Sergey Biryukov
78f8073a72 Post Formats: Remove CSS transition effect on post format icons in the Posts list table.
Props afercia, melchoyce.
See #46591, #35497.
Built from https://develop.svn.wordpress.org/trunk@44963


git-svn-id: http://core.svn.wordpress.org/trunk@44794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 16:36:51 +00:00
Sergey Biryukov
99b929cbbc Accessibility: Remove post format filter links from format icons in the Posts list table.
Introduce a dedicated 'Formats' drop-down filter as a replacement.

Keep the icons as a simple visual indicator of the post format for now.

Props afercia, melchoyce, GaryJ, chiaralovelaces, SergeyBiryukov.
Fixes #35497.
Built from https://develop.svn.wordpress.org/trunk@44961


git-svn-id: http://core.svn.wordpress.org/trunk@44792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 15:32:01 +00:00
desrosj
899e7d3800 Posts, Post Types: Add type parameter to post_exists().
This allows post exists checks scoped to a specific post type.

Props sgarza, birgire, swissspidy.
Fixes #37406.
Built from https://develop.svn.wordpress.org/trunk@44959


git-svn-id: http://core.svn.wordpress.org/trunk@44790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:44:54 +00:00
tellyworth
e38814f359 Upgrade/Install: Add experimental package signing to some updates.
This adds code for soft verification of signatures for theme and plugin installs and updates, when provided by the update server. This experimental version does not reject unverified packages or failed signatures; it simply reports anonymous errors so we can evaluate its feasibility and detect incompatibilities.

This code relies on the new sodium_compat library for PHP versions prior to 7.2.

Props dd32, paragoninitiativeenterprises.
See #39309, #45806.

Built from https://develop.svn.wordpress.org/trunk@44954


git-svn-id: http://core.svn.wordpress.org/trunk@44785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 05:49:50 +00:00
desrosj
217849aab3 Menus: Ensure consistent padding in the menu structure form.
Props shital-patel, welcher, hardik-amipara, audrasjb.
Fixes #42596.
Built from https://develop.svn.wordpress.org/trunk@44952


git-svn-id: http://core.svn.wordpress.org/trunk@44783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 02:56:51 +00:00
aduth
9cf4ee65a7 Scripts: Assign api-fetch nonce with corrected rest_nonce.
As of `@wordpress/api-fetch@3.0.0` (introduced in 44812), the `apiFetch` nonce middleware must have its nonce value assigned explicitly, and will no longer listen for heartbeat ticks automatically. This changeset adds an inline script for the default registration of the `api-fetch` script handle to assign the nonce value in response to the heartbeat action. In doing so, it removes the now-unused, misnamed `rest-nonce` property from the heartbeat response, whose original introduction served as temporary compatibility with earlier versions of `@wordpress/api-fetch`.

See https://github.com/WordPress/gutenberg/pull/13451
See #45113

Props adamsilverstein, nerrad .
Fixes #46107 .

Built from https://develop.svn.wordpress.org/trunk@44949


git-svn-id: http://core.svn.wordpress.org/trunk@44780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:53:50 +00:00
desrosj
289233ee46 I18N: Remove admin notice when the WPLANG constant is no longer necessary.
Introduced in [29630], this admin notice informs administrators (or network administrators on multisite installs) that the `WPLANG` constant is no longer needed when the locale returned by `get_locale()` does not match. After 5 years, the notice is being removed to avoid causing confusion for non-technical users.

The `_deprecated_argument()` call will persist to inform developers of the issue within log files.

Props flixos90, iworks, ocean90.
Fixes #39675.
Built from https://develop.svn.wordpress.org/trunk@44946


git-svn-id: http://core.svn.wordpress.org/trunk@44777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 18:58:50 +00:00
desrosj
18754216be Administration: Ensure consistent alignment for time and date fields across edit screens.
This change ensures that the values of time and date fields for comments and posts (both Classic Editor and quick edit) are consistently aligned in the center of the input fields. The block editor already enforces this alignment separately.

Props birgire, jainnidhi, melchoyce.
Fixes #43675.
Built from https://develop.svn.wordpress.org/trunk@44945


git-svn-id: http://core.svn.wordpress.org/trunk@44776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 18:29:53 +00:00
desrosj
22d61857fc Plugins: Block plugin updates on the update screen if required PHP version is not supported.
This brings the changes in [44937] to the WordPress Updates page in the admin. Now, when a site does not meet the minimum PHP version requirements for a plugin update, the user will not be able to update. Instead, they will be presented with educational information to guide them through the process of updating PHP.

Props afragen, miyauchi, TimothyBlynJacobs, desrosj.
Fixes #44350. 
Built from https://develop.svn.wordpress.org/trunk@44939


git-svn-id: http://core.svn.wordpress.org/trunk@44770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 14:59:50 +00:00
Dominik Schilling
c32bc04fdc Meta Boxes: Use a unique name for the nonce of the meta box loader.
Fixes a case where saving in the block editor fails if there are two `_wpnonce` arguments in the request, one overriding the other so that `use_block_editor_for_post()` wasn't able to check the nonce properly.

Props Chouby.
See #45253.
Built from https://develop.svn.wordpress.org/trunk@44938


git-svn-id: http://core.svn.wordpress.org/trunk@44769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 08:12:51 +00:00
desrosj
fae24d54fe Plugins: Block plugin updates if required PHP version is not supported.
When a plugin states it requires a specific minimum PHP version (as defined in the `requires_php` field included in the plugin update API response), a user should not be allowed to update that plugin when the server does not satisfy the minimum PHP version.

When this scenario is encountered, the update buttons and links are disabled and links to educational resources about PHP are displayed to the user with a notice.

Props afragen, schlessera, desrosj.
Fixes #43987. 
Built from https://develop.svn.wordpress.org/trunk@44937


git-svn-id: http://core.svn.wordpress.org/trunk@44768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 01:44:51 +00:00
desrosj
612a0c8c80 General: Prevent nested paragraph tags when displaying PHP update annotations.
This change utilizes the new parameters accepted by `wp_update_php_annotation()` introduced in [44935] to prevent nested `<p>` tags when displaying the PHP update annotation.

Props afragen, desrosj.
Fixes #46269.
Built from https://develop.svn.wordpress.org/trunk@44936


git-svn-id: http://core.svn.wordpress.org/trunk@44767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-19 20:41:53 +00:00
Felix Arntz
97d33e5231 Multisite: Do not prime site meta caches unless necessary.
Props spacedmonkey.
Fixes #46357. See #46167.

Built from https://develop.svn.wordpress.org/trunk@44926


git-svn-id: http://core.svn.wordpress.org/trunk@44757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-18 15:56:51 +00:00
Andrea Fercia
e901bc4c2b 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.

Built from https://develop.svn.wordpress.org/trunk@44924


git-svn-id: http://core.svn.wordpress.org/trunk@44755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-18 15:22:53 +00:00
Sergey Biryukov
72b33ec883 Docs: Correct grammar in PemFTP description.
Props umang7.
Fixes #46507.
Built from https://develop.svn.wordpress.org/trunk@44920


git-svn-id: http://core.svn.wordpress.org/trunk@44751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:20:49 +00:00
Sergey Biryukov
2ba199472f Docs: Use 3-digit, x.x.x style semantic versioning for @since 2.5.0 entries in wp-admin/includes/class-ftp.php.
Missed in [26868].

Props mukesh27.
See #46507.
Built from https://develop.svn.wordpress.org/trunk@44919


git-svn-id: http://core.svn.wordpress.org/trunk@44750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-17 01:18:50 +00:00
desrosj
c84bb94796 Networks and Sites: Introduce populate_site_meta filter.
The `populate_site_meta` filter can be used to modify the site meta added during the creation of a new site. This filter mirrors the approach used for networks in `populate_network_meta`.

Props spacedmonkey, davidbaumwald.
Fixes #46437.
Built from https://develop.svn.wordpress.org/trunk@44912


git-svn-id: http://core.svn.wordpress.org/trunk@44743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 19:43:50 +00:00
desrosj
2019967721 Privacy: Improve data export/erasure error messages and translator comments.
These changes address inaccuracies in current messages and makes them more informative.

Props birgire, garrett-eclipse, desrosj.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@44908


git-svn-id: http://core.svn.wordpress.org/trunk@44739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 18:07:50 +00:00
Andrea Fercia
8f69ebf812 Accessibility: Improve the semantics of "tabs" that are not real ARIA tabs.
Some "visual tabs" in the WordPress admin used links wrapped in a `h2` heading. While these tabs look like ARIA tabs, they're just navigation menus and should be marked-up as such to be correctly exposed to assistive technologies.
- changes the wrapping `<h2>` to a `<nav>` element: worth reminding `<nav>` elements also define ARIA landmarks
- adds an `aria-label` to the `<nav>` elements so they can be distinguished from other `<nav>` elements in the page
- adjusts the headings level in the Credits page

Props audrasjb, afercia.
Fixes #43398.

Built from https://develop.svn.wordpress.org/trunk@44905


git-svn-id: http://core.svn.wordpress.org/trunk@44736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 14:54:52 +00:00
Andrea Fercia
72979b167d 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.

Built from https://develop.svn.wordpress.org/trunk@44896


git-svn-id: http://core.svn.wordpress.org/trunk@44727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-14 17:39:53 +00:00
Andrea Fercia
ca53eac85e Accessibility: Improve the password form buttons accessibility.
- makes the "Cancel" button always visible: this allows to generate a new password also on small screens
- moves focus back to the Generate Password button when closing the form
- changes the password reset show/hide button from a clickable `<span>` element to a real `<button>` element
- improves the CSS

Props janak007, afercia.
Fixes #42853.

Built from https://develop.svn.wordpress.org/trunk@44895


git-svn-id: http://core.svn.wordpress.org/trunk@44726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-13 23:37:57 +00:00
Sergey Biryukov
0292de60ec Comments: Improve comment content filtering.
Built from https://develop.svn.wordpress.org/trunk@44842


git-svn-id: http://core.svn.wordpress.org/trunk@44674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-12 22:30:50 +00:00