Make WordPress Core

Changeset 45509 for branches/5.2


Ignore:
Timestamp:
06/10/2019 01:32:01 PM (5 years ago)
Author:
afercia
Message:

Accessibility: Improve the Screen Options and Help buttons order.

  • makes the buttons visual order match the DOM order
  • also, restores the focus style on the "hero" primary button after [34948]

Props vrimill, mukesh27 for reporting and testing.
Merges [45503] to the 5.2 branch.
Fixes #45094 for 5.2.2.

Location:
branches/5.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/css/common.css

    r45333 r45509  
    16601660
    16611661#screen-meta-links {
     1662    float: right;
    16621663    margin: 0 20px 0 0;
    16631664}
     
    16761677#screen-options-link-wrap,
    16771678#contextual-help-link-wrap {
    1678     float: right;
     1679    float: left;
    16791680    height: 28px;
    16801681    margin: 0 0 0 6px;
  • branches/5.2/src/wp-admin/includes/class-wp-screen.php

    r45224 r45509  
    928928        ?>
    929929        <div id="screen-meta-links">
    930         <?php if ( $this->get_help_tabs() ) : ?>
    931             <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
    932             <button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
     930        <?php if ( $this->show_screen_options() ) : ?>
     931            <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
     932            <button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
    933933            </div>
    934934            <?php
    935935        endif;
    936         if ( $this->show_screen_options() ) :
     936        if ( $this->get_help_tabs() ) :
    937937            ?>
    938             <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
    939             <button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
     938            <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
     939            <button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
    940940            </div>
    941941        <?php endif; ?>
  • branches/5.2/src/wp-includes/css/buttons.css

    r45150 r45509  
    287287}
    288288
     289.wp-core-ui .button.button-primary.button-hero:focus {
     290    box-shadow:
     291        0 2px 0 #006799,
     292        0 1px 0 #0073aa,
     293        0 0 2px 1px #33b3db;
     294}
     295
    289296.wp-core-ui .button.button-primary.button-hero.active,
    290297.wp-core-ui .button.button-primary.button-hero.active:hover,
Note: See TracChangeset for help on using the changeset viewer.