Make WordPress Core

Changeset 21457


Ignore:
Timestamp:
08/06/2012 04:26:37 AM (14 years ago)
Author:
azaozz
Message:

Accessibility: enhance the Screen Options and Help tabs open/close, see #21326

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r20715 r21457  
    745745                <div id="screen-meta" class="metabox-prefs">
    746746
    747                         <div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>">
     747                        <div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>" tabindex="-1" aria-label="<?php esc_attr_e('Contextual Help Tab'); ?>">
    748748                                <div id="contextual-help-back"></div>
    749749                                <div id="contextual-help-columns">
    … …  
    758758
    759759                                                        <li id="<?php echo esc_attr( $link_id ); ?>"<?php echo $class; ?>>
    760                                                                 <a href="<?php echo esc_url( "#$panel_id" ); ?>">
     760                                                                <a href="<?php echo esc_url( "#$panel_id" ); ?>" aria-controls="<?php echo esc_attr( $panel_id ); ?>">
    761761                                                                        <?php echo esc_html( $tab['title'] ); ?>
    762762                                                                </a>
    … …  
    828828                <?php if ( $this->get_help_tabs() ) : ?>
    829829                        <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
    830                         <a href="#contextual-help-wrap" id="contextual-help-link" class="show-settings"><?php _e( 'Help' ); ?></a>
     830                        <a href="#contextual-help-wrap" id="contextual-help-link" class="show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></a>
    831831                        </div>
    832832                <?php endif;
    833833                if ( $this->show_screen_options() ) : ?>
    834834                        <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
    835                         <a href="#screen-options-wrap" id="show-settings-link" class="show-settings"><?php _e( 'Screen Options' ); ?></a>
     835                        <a href="#screen-options-wrap" id="show-settings-link" class="show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></a>
    836836                        </div>
    837837                <?php endif; ?>
    … …  
    877877
    878878                ?>
    879                 <div id="screen-options-wrap" class="hidden">
     879                <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
    880880                <form id="adv-settings" action="" method="post">
    881881                <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
  • trunk/wp-admin/js/common.dev.js

    r21435 r21457  
    122122                panel.parent().show();
    123123                panel.slideDown( 'fast', function() {
    124                         link.addClass('screen-meta-active');
     124                        panel.focus();
     125                        link.addClass('screen-meta-active').attr('aria-expanded', true);
    125126                });
    126127        },
    … …  
    128129        close: function( panel, link ) {
    129130                panel.slideUp( 'fast', function() {
    130                         link.removeClass('screen-meta-active');
     131                        link.removeClass('screen-meta-active').attr('aria-expanded', false);
    131132                        $('.screen-meta-toggle').css('visibility', '');
    132133                        panel.parent().hide();
Note: See TracChangeset for help on using the changeset viewer.