WordPress.org

Make WordPress Core

Changeset 37734


Ignore:
Timestamp:
06/16/2016 09:50:39 PM (3 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wp-a11y.js

    r33201 r37734  
    55
    66    var $containerPolite,
    7         $containerAssertive,
    8         role;
     7        $containerAssertive;
    98
    109    /**
     
    4039    function addContainer( ariaLive ) {
    4140        ariaLive = ariaLive || 'polite';
    42         role = 'assertive' === ariaLive ? 'alert' : 'status';
    4341
    4442        var $container = $( '<div>', {
    4543            'id': 'wp-a11y-speak-' + ariaLive,
    46             'role': role,
    4744            'aria-live': ariaLive,
    4845            'aria-relevant': 'additions text',
Note: See TracChangeset for help on using the changeset viewer.