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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-09-17 15:39:30 +00:00
parent 405def3da4
commit 576bdf9f8c
16 changed files with 42 additions and 118 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: right;
float: right;
line-height: 28px;
}
#publishing-action {

File diff suppressed because one or more lines are too long

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 {

File diff suppressed because one or more lines are too long

View File

@ -129,23 +129,10 @@ input#link_url {
float: right;
}
.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;

File diff suppressed because one or more lines are too long

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;

File diff suppressed because one or more lines are too long

View File

@ -139,12 +139,15 @@ ul.add-menu-item-tabs li {
}
/* Menu Container */
/* @todo: responsive view. */
#menu-management-liquid {
float: right;
min-width: 100%;
margin-top: 3px;
}
/* @todo: responsive view. */
#menu-management {
position: relative;
margin-left: 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: right;
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-left: 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: right;
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,

File diff suppressed because one or more lines are too long

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,

File diff suppressed because one or more lines are too long

View File

@ -162,7 +162,7 @@ endif; ?>
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
</div>
<div id="publishing-action">
<?php submit_button( __( 'Update' ), 'primary', 'save', false ); ?>
<?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?>
</div>
<div class="clear"></div>
</div>

View File

@ -252,14 +252,14 @@ if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0
if ( $can_publish ) :
if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
<?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false ); ?>
<?php submit_button( __( 'Schedule' ), 'primary large', 'publish', false ); ?>
<?php else : ?>
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
<?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false ); ?>
<?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
<?php endif;
else : ?>
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
<?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false ); ?>
<?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
<?php
endif;
} else { ?>
@ -334,7 +334,7 @@ function attachment_submit_meta_box( $post ) {
<div id="publishing-action">
<span class="spinner"></span>
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" />
<input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" />
</div>
<div class="clear"></div>
</div><!-- #major-publishing-actions -->
@ -909,9 +909,9 @@ if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('m
<div id="publishing-action">
<?php if ( !empty($link->link_id) ) { ?>
<input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" />
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" />
<?php } else { ?>
<input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" />
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" />
<?php } ?>
</div>
<div class="clear"></div>

View File

@ -759,7 +759,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<label class="menu-name-label" for="menu-name"><?php _e( 'Menu Name' ); ?></label>
<input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox" <?php echo $menu_name_val . $menu_name_aria_desc; ?> />
<div class="publishing-action">
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?>
</div><!-- END .publishing-action -->
</div><!-- END .major-publishing-actions -->
</div><!-- END .nav-menu-header -->
@ -836,7 +836,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
</span><!-- END .delete-action -->
<?php endif; ?>
<div class="publishing-action">
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
</div><!-- END .publishing-action -->
</div><!-- END .major-publishing-actions -->
</div><!-- /#nav-menu-footer -->

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38614';
$wp_version = '4.7-alpha-38616';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.