Make WordPress Core

Changeset 44639


Ignore:
Timestamp:
01/17/2019 11:54:23 AM (5 years ago)
Author:
afercia
Message:

Accessibility: Improve the way Internet Explorer 11 and JAWS announce fieldset legends.

When Internet Explorer encounters a non interactive element with a tabindex
attribute, it adds the element to the accessibility tree with a role=group and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.

  • removes tabindex="0" from the content and the toolbar containers: these tabindex attributes are no longer needed
  • removes aria-label="Main content" from the content container: not needed
  • keeps the media modal focus fallback introduced in [38142] by making the #wpbody-content element focusable only when needed

Props stevefaulkner, aardrian.
Fixes #43154.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/modal.js

    r43309 r44639  
    138138            this.clickedOpenerEl.focus();
    139139        } else {
    140             $( '#wpbody-content' ).focus();
     140            $( '#wpbody-content' )
     141                .attr( 'tabindex', '-1' )
     142                .focus();
    141143        }
    142144
  • trunk/src/wp-admin/admin-header.php

    r44133 r44639  
    249249?>
    250250
    251 <div id="wpbody-content" aria-label="<?php esc_attr_e( 'Main content' ); ?>" tabindex="0">
     251<div id="wpbody-content">
    252252<?php
    253253
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r42343 r44639  
    439439                <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a>
    440440            <?php } ?>
    441             <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>" tabindex="0">
     441            <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>">
    442442                <?php
    443443                foreach ( $root->children as $group ) {
Note: See TracChangeset for help on using the changeset viewer.