WordPress.org

Make WordPress Core

Changeset 38616


Ignore:
Timestamp:
09/17/16 15:38:40 (6 months ago)
Author:
afercia
Message:

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.

Location:
trunk/src/wp-admin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r38536 r38616  
    856856#nav-menu-footer .menu-delete:hover { 
    857857    color: #f00; 
    858     text-decoration: none; 
    859858    border: none; 
    860859} 
     
    876875 
    877876#delete-action { 
     877    float: left; 
    878878    line-height: 28px; 
    879     vertical-align: middle; 
    880     text-align: left; 
    881     float: left; 
    882879} 
    883880 
  • trunk/src/wp-admin/css/edit.css

    r38153 r38616  
    130130} 
    131131 
    132 .submitbox .submitdelete { 
    133     text-decoration: none; 
    134     padding: 1px 2px; 
    135 } 
    136  
    137132body.post-new-php .submitbox .submitdelete { 
    138133    display: none; 
    139 } 
    140  
    141 /* @todo: do we really need this? word on the street is we don't and this 
    142 stray rule may actually be compensated for elsewhere. */ 
    143 #normal-sortables .submitbox .submitdelete:hover { 
    144     color: #000; 
    145     background-color: #f00; 
    146     border-bottom-color: #f00; 
    147134} 
    148135 
     
    645632} 
    646633 
     634#linksubmitdiv .inside, /* Old Link Manager back-compat. */ 
    647635#poststuff #submitdiv .inside { 
    648636    margin: 0; 
  • trunk/src/wp-admin/css/nav-menus.css

    r38153 r38616  
    140140 
    141141/* Menu Container */ 
     142 
     143/* @todo: responsive view. */ 
    142144#menu-management-liquid { 
    143145    float: left; 
     
    146148} 
    147149 
     150/* @todo: responsive view. */ 
    148151#menu-management { 
    149152    position: relative; 
     
    283286    margin: 0 0 10px; 
    284287    padding: 0; 
    285 } 
    286  
    287 .nav-menus-php .meta-sep, 
    288 .nav-menus-php .submitdelete, 
    289 .nav-menus-php .submitcancel { 
    290     display: block; 
    291     float: left; 
    292     margin: 6px 0; 
    293     line-height: 15px; 
    294 } 
    295  
    296 .meta-sep { 
    297     padding: 0 2px; 
    298288} 
    299289 
     
    481471    line-height: 20px; 
    482472    display: block; 
     473    /* @todo: responsive view. */ 
    483474    margin-right: 13em; 
    484475} 
     
    672663.link-to-original { 
    673664    display: block; 
    674     margin: 0 0 10px; 
     665    margin: 0 0 15px; 
    675666    padding: 3px 5px 5px; 
    676667    border: 1px solid #ddd; 
     
    705696.menu-item-actions { 
    706697    padding-top: 15px; 
     698    padding-bottom: 7px; 
    707699} 
    708700 
     
    714706.nav-menus-php .major-publishing-actions { 
    715707    clear: both; 
    716     padding: 7px 0 6px; 
     708    padding: 10px 0; 
     709    line-height: 28px; 
    717710} 
    718711 
     
    726719} 
    727720 
     721/* Same as the Publish Meta Box #delete-action */ 
    728722.nav-menus-php .delete-action { 
    729723    float: left; 
    730     margin-top: 2px; 
    731 } 
    732  
    733 .nav-menus-php .submitbox .submitcancel { 
    734     border-bottom: 1px solid #0073aa; 
    735     padding: 1px 2px; 
    736     color: #0073aa; 
    737     text-decoration: none; 
    738 } 
    739  
    740 .nav-menus-php .submitbox .submitcancel:hover { 
    741     background: #0073aa; 
    742     color: #fff; 
     724    line-height: 28px; 
    743725} 
    744726 
     
    826808    } 
    827809 
    828     .nav-menus-php .major-publishing-actions .publishing-action { 
    829         margin-top: 6px; 
    830     } 
    831  
    832810    .nav-menus-php .delete-action { 
    833811        font-size: 14px; 
    834         line-height: 50px; 
    835         margin-top: 12px; 
     812        line-height: 30px; 
    836813    } 
    837814 
  • trunk/src/wp-admin/edit-form-comment.php

    r37674 r38616  
    163163</div> 
    164164<div id="publishing-action"> 
    165 <?php submit_button( __( 'Update' ), 'primary', 'save', false ); ?> 
     165<?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?> 
    166166</div> 
    167167<div class="clear"></div> 
  • trunk/src/wp-admin/includes/meta-boxes.php

    r38590 r38616  
    253253        if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 
    254254        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> 
    255         <?php submit_button( __( 'Schedule' ), 'primary button-large', 'publish', false ); ?> 
     255        <?php submit_button( __( 'Schedule' ), 'primary large', 'publish', false ); ?> 
    256256<?php   else : ?> 
    257257        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> 
    258         <?php submit_button( __( 'Publish' ), 'primary button-large', 'publish', false ); ?> 
     258        <?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?> 
    259259<?php   endif; 
    260260    else : ?> 
    261261        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> 
    262         <?php submit_button( __( 'Submit for Review' ), 'primary button-large', 'publish', false ); ?> 
     262        <?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?> 
    263263<?php 
    264264    endif; 
     
    335335        <span class="spinner"></span> 
    336336        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> 
    337         <input name="save" type="submit" class="button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" /> 
     337        <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ) ?>" /> 
    338338    </div> 
    339339    <div class="clear"></div> 
     
    910910<div id="publishing-action"> 
    911911<?php if ( !empty($link->link_id) ) { ?> 
    912     <input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" /> 
     912    <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ) ?>" /> 
    913913<?php } else { ?> 
    914     <input name="save" type="submit" class="button-large button-primary" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" /> 
     914    <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ) ?>" /> 
    915915<?php } ?> 
    916916</div> 
  • trunk/src/wp-admin/nav-menus.php

    r37914 r38616  
    760760                            <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; ?> /> 
    761761                            <div class="publishing-action"> 
    762                                 <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?> 
     762                                <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_header' ) ); ?> 
    763763                            </div><!-- END .publishing-action --> 
    764764                        </div><!-- END .major-publishing-actions --> 
     
    837837                            <?php endif; ?> 
    838838                            <div class="publishing-action"> 
    839                                 <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'button-primary menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?> 
     839                                <?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?> 
    840840                            </div><!-- END .publishing-action --> 
    841841                        </div><!-- END .major-publishing-actions --> 
Note: See TracChangeset for help on using the changeset viewer.