Make WordPress Core


Ignore:
Timestamp:
06/08/2019 04:30:15 PM (6 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.
Fixes #45094.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r45224 r45503  
    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; ?>
Note: See TracChangeset for help on using the changeset viewer.