mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Accessibility: fix the Skip to content link, show it on :focus, improve the styling of the skip links when shown, see #21310, see #21471
git-svn-id: http://core.svn.wordpress.org/trunk@21435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
09c319a557
commit
c368f0e6a1
@ -107,7 +107,7 @@ if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_them
|
||||
?>
|
||||
|
||||
<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>
|
||||
<a tabindex="1" href="#wpbody-content" class="screen-reader-text screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
|
||||
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
||||
<div id="wpcontent">
|
||||
|
||||
@ -123,7 +123,7 @@ $current_screen->set_parentage( $parent_file );
|
||||
|
||||
?>
|
||||
|
||||
<div id="wpbody-content" tabindex="-1" aria-label="<?php esc_attr_e('Main content'); ?>">
|
||||
<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>">
|
||||
<?php
|
||||
|
||||
$current_screen->render_screen_meta();
|
||||
|
@ -198,6 +198,20 @@ TABLE OF CONTENTS:
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.screen-reader-shortcut:focus {
|
||||
left: 5px;
|
||||
top: 5px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border: 2px solid #333;
|
||||
border-radius: 3px;
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.hidden,
|
||||
.js .closed .inside,
|
||||
.js .hide-if-js,
|
||||
|
@ -374,11 +374,6 @@ $(document).ready( function() {
|
||||
pageInput.val('1');
|
||||
});
|
||||
}
|
||||
|
||||
$('#wpbody-content-shortcut').bind('click.wp-skip-to-content', function(e){
|
||||
$('#wpbody-content').focus();
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
// internal use
|
||||
|
@ -619,17 +619,19 @@
|
||||
}
|
||||
|
||||
#wpadminbar #wpadminbar-shortcut:focus {
|
||||
left: 0;
|
||||
top: 0;
|
||||
left: 5px;
|
||||
top: 5px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
outline: none;
|
||||
border: 2px solid #333;
|
||||
border-radius: 3px;
|
||||
z-index: 100000;
|
||||
text-shadow: none;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user