Add "Skip to content" link to all screens in the admin, fixes #21361
git-svn-id: https://develop.svn.wordpress.org/trunk@21305 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3778e5ea4a
commit
bf65e730f6
@ -107,6 +107,7 @@ if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_them
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="wpwrap">
|
<div id="wpwrap">
|
||||||
|
<a id="wpbody-content-shortcut" tabindex="5" href="#wpbody-content" class="hide-if-no-js screen-reader-text"><?php _e('Skip to main content'); ?></a>
|
||||||
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
||||||
<div id="wpcontent">
|
<div id="wpcontent">
|
||||||
|
|
||||||
@ -122,7 +123,7 @@ $current_screen->set_parentage( $parent_file );
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="wpbody-content">
|
<div id="wpbody-content" tabindex="-1" aria-label="<?php esc_attr_e('Main content'); ?>">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$current_screen->render_screen_meta();
|
$current_screen->render_screen_meta();
|
||||||
|
@ -361,6 +361,10 @@ $(document).ready( function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('#wpbody-content-shortcut').bind('click.wp-skip-to-content', function(e){
|
||||||
|
$('#wpbody-content').focus();
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// internal use
|
// internal use
|
||||||
|
Loading…
Reference in New Issue
Block a user