mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 20:30:43 +01:00
6b7f68855b
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. Built from https://develop.svn.wordpress.org/trunk@37734 git-svn-id: http://core.svn.wordpress.org/trunk@37699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 line
599 B
JavaScript
1 line
599 B
JavaScript
window.wp=window.wp||{},function(a,b){"use strict";function c(a,b){e(),g&&"assertive"===b?g.text(a):f&&f.text(a)}function d(a){a=a||"polite";var c=b("<div>",{id:"wp-a11y-speak-"+a,"aria-live":a,"aria-relevant":"additions text","aria-atomic":"true","class":"screen-reader-text wp-a11y-speak-region"});return b(document.body).append(c),c}function e(){b(".wp-a11y-speak-region").text("")}var f,g;b(document).ready(function(){f=b("#wp-a11y-speak-polite"),g=b("#wp-a11y-speak-assertive"),f.length||(f=d("polite")),g.length||(g=d("assertive"))}),a.a11y=a.a11y||{},a.a11y.speak=c}(window.wp,window.jQuery); |