From 6b489bb12512f67d49d012c7c5fa7bd0cf16ed29 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 17 Jan 2019 11:54:23 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@44639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/media/views/modal.js | 4 +++- src/wp-admin/admin-header.php | 2 +- src/wp-includes/class-wp-admin-bar.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/media/views/modal.js b/src/js/media/views/modal.js index 48150b74ec..75ffe06d66 100644 --- a/src/js/media/views/modal.js +++ b/src/js/media/views/modal.js @@ -137,7 +137,9 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ if ( null !== this.clickedOpenerEl ) { this.clickedOpenerEl.focus(); } else { - $( '#wpbody-content' ).focus(); + $( '#wpbody-content' ) + .attr( 'tabindex', '-1' ) + .focus(); } this.propagate('close'); diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php index f00fab9bce..5f0fb75916 100644 --- a/src/wp-admin/admin-header.php +++ b/src/wp-admin/admin-header.php @@ -248,7 +248,7 @@ $current_screen->set_parentage( $parent_file ); ?> -
+
render_screen_meta(); diff --git a/src/wp-includes/class-wp-admin-bar.php b/src/wp-includes/class-wp-admin-bar.php index 72b7ce4111..6fb5486bf4 100644 --- a/src/wp-includes/class-wp-admin-bar.php +++ b/src/wp-includes/class-wp-admin-bar.php @@ -438,7 +438,7 @@ class WP_Admin_Bar { -