From bf65e730f61aadf420ff636a71a0193bdce2ae8a Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 23 Jul 2012 22:00:06 +0000 Subject: [PATCH] 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 --- wp-admin/admin-header.php | 3 ++- wp-admin/js/common.dev.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 248897c987..e2eb9bd9a7 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -107,6 +107,7 @@ if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_them ?>
+
@@ -122,7 +123,7 @@ $current_screen->set_parentage( $parent_file ); ?> -
+
render_screen_meta(); diff --git a/wp-admin/js/common.dev.js b/wp-admin/js/common.dev.js index d3d9e70019..d54584315e 100644 --- a/wp-admin/js/common.dev.js +++ b/wp-admin/js/common.dev.js @@ -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