Accessibility: Standardize the remove/delete/cancel links in the Menus screen and Publish meta boxes.

The `submitdelete` CSS class is used in various places across the admin for some
"red" action links. It is worth simplifying this rule for further improvements
related to color contrast.

- simplifies a non-standard styling for the "Remove/Cancel" links in the Menus screen
- underlines all the "Move to trash/Delete" red links in all the Publish meta boxes
- fixes CSS classes usage for all the Publish meta boxes primary buttons
- fixes broken layout for the old Link Manager publish meta box

Props karmatosed, hugobaeta, monikarao, afercia.
Fixes #37969, #37018. See #37448, #37138, #27314.


git-svn-id: https://develop.svn.wordpress.org/trunk@38616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2016-09-17 15:38:40 +00:00
parent 6eb3e0bf5f
commit aa021ff89f
6 changed files with 22 additions and 60 deletions

View File

@@ -855,7 +855,6 @@ span.required,
#media-items a.delete-permanently:hover,
#nav-menu-footer .menu-delete:hover {
color: #f00;
text-decoration: none;
border: none;
}
@@ -875,10 +874,8 @@ span.required,
}
#delete-action {
line-height: 28px;
vertical-align: middle;
text-align: left;
float: left;
line-height: 28px;
}
#publishing-action {

View File

@@ -129,23 +129,10 @@ input#link_url {
float: left;
}
.submitbox .submitdelete {
text-decoration: none;
padding: 1px 2px;
}
body.post-new-php .submitbox .submitdelete {
display: none;
}
/* @todo: do we really need this? word on the street is we don't and this
stray rule may actually be compensated for elsewhere. */
#normal-sortables .submitbox .submitdelete:hover {
color: #000;
background-color: #f00;
border-bottom-color: #f00;
}
.submitbox .submit a:hover {
text-decoration: underline;
}
@@ -644,6 +631,7 @@ span.wp-media-buttons-icon:before {
margin-top: 3px;
}
#linksubmitdiv .inside, /* Old Link Manager back-compat. */
#poststuff #submitdiv .inside {
margin: 0;
padding: 0;

View File

@@ -139,12 +139,15 @@ ul.add-menu-item-tabs li {
}
/* Menu Container */
/* @todo: responsive view. */
#menu-management-liquid {
float: left;
min-width: 100%;
margin-top: 3px;
}
/* @todo: responsive view. */
#menu-management {
position: relative;
margin-right: 20px;
@@ -284,19 +287,6 @@ ul.add-menu-item-tabs li {
padding: 0;
}
.nav-menus-php .meta-sep,
.nav-menus-php .submitdelete,
.nav-menus-php .submitcancel {
display: block;
float: left;
margin: 6px 0;
line-height: 15px;
}
.meta-sep {
padding: 0 2px;
}
/* @todo: is this actually used? */
#cancel-save {
text-decoration: underline;
@@ -480,6 +470,7 @@ ul.add-menu-item-tabs li {
font-weight: 600;
line-height: 20px;
display: block;
/* @todo: responsive view. */
margin-right: 13em;
}
@@ -671,7 +662,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
.link-to-original {
display: block;
margin: 0 0 10px;
margin: 0 0 15px;
padding: 3px 5px 5px;
border: 1px solid #ddd;
color: #72777c;
@@ -704,6 +695,7 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
.menu-item-actions {
padding-top: 15px;
padding-bottom: 7px;
}
#cancel-save {
@@ -713,7 +705,8 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
/* Major/minor publishing actions (classes) */
.nav-menus-php .major-publishing-actions {
clear: both;
padding: 7px 0 6px;
padding: 10px 0;
line-height: 28px;
}
.nav-menus-php .major-publishing-actions .publishing-action {
@@ -725,21 +718,10 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
display: none;
}
/* Same as the Publish Meta Box #delete-action */
.nav-menus-php .delete-action {
float: left;
margin-top: 2px;
}
.nav-menus-php .submitbox .submitcancel {
border-bottom: 1px solid #0073aa;
padding: 1px 2px;
color: #0073aa;
text-decoration: none;
}
.nav-menus-php .submitbox .submitcancel:hover {
background: #0073aa;
color: #fff;
line-height: 28px;
}
.nav-menus-php .major-publishing-actions .form-invalid {
@@ -825,14 +807,9 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
margin-top: 4px;
}
.nav-menus-php .major-publishing-actions .publishing-action {
margin-top: 6px;
}
.nav-menus-php .delete-action {
font-size: 14px;
line-height: 50px;
margin-top: 12px;
line-height: 30px;
}
.menu-item-bar .menu-item-handle,