Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Ozz
3a0563e853 Site Health info tab: fix replacing the size strings in the copied info.
Props xkon.
See #46707.
Built from https://develop.svn.wordpress.org/trunk@45241


git-svn-id: http://core.svn.wordpress.org/trunk@45050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 04:51:52 +00:00
Andrew Ozz
9659676fca 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.
Built from https://develop.svn.wordpress.org/trunk@45239


git-svn-id: http://core.svn.wordpress.org/trunk@45048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 00:34:51 +00:00
Andrew Ozz
9a316c6ea4 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.
Built from https://develop.svn.wordpress.org/trunk@45220


git-svn-id: http://core.svn.wordpress.org/trunk@45029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-16 23:02:51 +00:00
Andrea Fercia
b0ef0ae305 Site health: Improve jQuery selectors so that they don't depend on a specific markup.
Amends [45178].
See #46683.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-14 14:30:51 +00:00
Andrea Fercia
a9542cd60a Coding standards: Site health: Avoid to use var in the middle of JavaScript function blocks.
Amends [45178].
See #46683.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-14 13:49:55 +00:00
Sergey Biryukov
1ae11820fc 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.
Built from https://develop.svn.wordpress.org/trunk@45178


git-svn-id: http://core.svn.wordpress.org/trunk@44987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 20:34:51 +00:00
Andrew Ozz
30ccfd540f 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.
Built from https://develop.svn.wordpress.org/trunk@45176


git-svn-id: http://core.svn.wordpress.org/trunk@44985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 19:24:51 +00:00
Andrea Fercia
2a99454732 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.

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


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

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


git-svn-id: http://core.svn.wordpress.org/trunk@44878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-29 11:27:51 +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
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
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
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