Accessibility: Add landmark roles to WordPress admin areas.

props afercia, joedolson.
fixes #31450.

git-svn-id: https://develop.svn.wordpress.org/trunk@31955 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-04-01 13:16:47 +00:00
parent b194676876
commit 14dc44fb83
4 changed files with 12 additions and 7 deletions

View File

@ -15,7 +15,7 @@ if ( !defined('ABSPATH') )
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
<div id="wpfooter">
<div id="wpfooter" role="contentinfo">
<?php
/**
* Fires after the opening tag for the admin footer.

View File

@ -190,7 +190,6 @@ if ( current_user_can( 'customize' ) ) {
?>
<div id="wpwrap">
<a tabindex="1" href="#wpbody-content" class="screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
<div id="wpcontent">
@ -203,7 +202,7 @@ if ( current_user_can( 'customize' ) ) {
do_action( 'in_admin_header' );
?>
<div id="wpbody">
<div id="wpbody" role="main">
<?php
unset($title_class, $blog_name, $total_update_count, $update_title);

View File

@ -219,9 +219,12 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
?>
<div id="adminmenumain" role="navigation" aria-label="<?php esc_attr_e( 'Main menu' ); ?>">
<a href="#wpbody-content" class="screen-reader-shortcut"><?php _e( 'Skip to main content' ); ?></a>
<a href="#wp-toolbar" class="screen-reader-shortcut"><?php _e( 'Skip to toolbar' ); ?></a>
<div id="adminmenuback"></div>
<div id="adminmenuwrap">
<ul id="adminmenu" role="navigation">
<ul id="adminmenu">
<?php
@ -236,3 +239,4 @@ do_action( 'adminmenu' );
?>
</ul>
</div>
</div>

View File

@ -363,9 +363,11 @@ class WP_Admin_Bar {
}
?>
<div id="wpadminbar" class="<?php echo $class; ?>" role="navigation">
<a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e('Skip to toolbar'); ?></a>
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e('Top navigation toolbar.'); ?>" tabindex="0">
<div id="wpadminbar" class="<?php echo $class; ?>">
<?php if ( ! is_admin() ) { ?>
<a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a>
<?php } ?>
<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>" tabindex="0">
<?php foreach ( $root->children as $group ) {
$this->_render_group( $group );
} ?>