WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2019 01:32:01 PM (14 months 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:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

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