Accessibility: Administration: Improve the sortable postboxes areas on the Dashboard and Classic Editor pages.

- makes the postboxes areas in the Dashboard visible also on large screens 
- uses a more meaningful text when all postboxes areas are empty instead of "Drag boxes here"
- restores the ability to drag boxes to the "advanced" area in the Classic Editor page
- makes the postboxes areas in the Classic Editor page visible while dragging so that users have a clue what the available areas are
- improves the color contrast of the postboxes areas while dragging
- uses `wp.i18n` for translatable strings in `wp-admin/js/postbox.js`

Props xkon, karmatosed, audrasjb, ocean90, joedolson, afercia, azaozz.
See #20491.
Fixes #49288, #47541.


git-svn-id: https://develop.svn.wordpress.org/trunk@48340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2020-07-06 18:01:55 +00:00
parent b0039629b3
commit 0fa6c2190a
5 changed files with 135 additions and 98 deletions

View File

@@ -1240,13 +1240,7 @@ function wp_default_scripts( $scripts ) {
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array( 'jquery' ), false, 1 );
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array( 'jquery-ui-sortable' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
'postbox',
'postBoxL10n',
array(
'postBoxEmptyString' => __( 'Drag boxes here' ),
)
);
$scripts->set_translations( 'postbox' );
$scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 );