Make WordPress Core


Ignore:
Timestamp:
08/05/2012 06:41:52 PM (14 years ago)
Author:
azaozz
Message:

Add "Skip to toolbar" accessibility shortcut, see #21471

File:
1 edited

Legend:

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

    r21259 r21423  
    349349                ?>
    350350                <div id="wpadminbar" class="<?php echo $class; ?>" role="navigation">
    351                         <div class="quicklinks">
     351                        <a id="wpadminbar-shortcut" href="#wp-toolbar" tabindex="1"><?php _e('Skip to toolbar'); ?></a>
     352                        <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e('Top navigation toolbar.'); ?>">
    352353                                <?php foreach ( $root->children as $group ) {
    353354                                        $this->_render_group( $group );
     
    396397                $has_link  = ! empty( $node->href );
    397398
    398                 $tabindex = isset( $node->meta['tabindex'] ) ? (int) $node->meta['tabindex'] : 10;
     399                $tabindex = isset( $node->meta['tabindex'] ) ? (int) $node->meta['tabindex'] : '';
     400                $aria_attributes = $tabindex ? 'tabindex="' . $tabindex . '"' : '';
    399401
    400402                $menuclass = '';
    401                 $aria_attributes = 'tabindex="' . $tabindex . '"';
    402403
    403404                if ( $is_parent ) {
Note: See TracChangeset for help on using the changeset viewer.