WordPress.org

Make WordPress Core

Ticket #21471: 21471.2.diff

File 21471.2.diff, 1.8 KB (added by lessbloat, 9 months ago)
  • wp-includes/js/admin-bar.js

     
    6666                        e.preventDefault(); 
    6767                        $('html, body').animate({ scrollTop: 0 }, 'fast'); 
    6868                }); 
     69                 
     70                $('.screen-reader-shortcut').keydown(function (e) { 
     71                        var thisHref = $(this).attr('href'); 
     72                        if ( 13 == e.which && thisHref.substring(0, 1) == "#" ) { 
     73                                setTimeout(function () { 
     74                                        $(thisHref).focus(); 
     75                                }, 100); 
     76                        } 
     77                }); 
    6978 
    7079        }); 
    7180} else { 
  • wp-includes/class-wp-admin-bar.php

     
    349349                ?> 
    350350                <div id="wpadminbar" class="<?php echo $class; ?>" role="navigation"> 
    351351                        <a class="screen-reader-text screen-reader-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.'); ?>"> 
     352                        <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e('Top navigation toolbar.'); ?>" tabindex="0"> 
    353353                                <?php foreach ( $root->children as $group ) { 
    354354                                        $this->_render_group( $group ); 
    355355                                } ?> 
  • wp-admin/admin-header.php

     
    126126 
    127127?> 
    128128 
    129 <div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>"> 
     129<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0"> 
    130130<?php 
    131131 
    132132$current_screen->render_screen_meta();