From 0cda9e306c56e2672e26ba45d6152fd957e8717d Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 16 Jun 2016 21:50:39 +0000 Subject: [PATCH] Accessibility: Remove the ARIA roles from the `wp.a11y.speak()` live regions. When Firefox repaints some elements, NVDA may announce "alert" even when there's no actual message dispatched to the live region. The NVDA implementation differs from other screen readers and is currently under discussion. To avoid a subpar user experience better to remove the roles since they're basically redundant. Fixes #36289. git-svn-id: https://develop.svn.wordpress.org/trunk@37734 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wp-a11y.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-includes/js/wp-a11y.js b/src/wp-includes/js/wp-a11y.js index 14f419a06b..3acca7ff99 100644 --- a/src/wp-includes/js/wp-a11y.js +++ b/src/wp-includes/js/wp-a11y.js @@ -4,8 +4,7 @@ window.wp = window.wp || {}; 'use strict'; var $containerPolite, - $containerAssertive, - role; + $containerAssertive; /** * Update the ARIA live notification area text node. @@ -39,11 +38,9 @@ window.wp = window.wp || {}; */ function addContainer( ariaLive ) { ariaLive = ariaLive || 'polite'; - role = 'assertive' === ariaLive ? 'alert' : 'status'; var $container = $( '
', { 'id': 'wp-a11y-speak-' + ariaLive, - 'role': role, 'aria-live': ariaLive, 'aria-relevant': 'additions text', 'aria-atomic': 'true',