1 line
640 B
JavaScript
1 line
640 B
JavaScript
window.wp=window.wp||{},function(a,i){"use strict";var n,s,p="";function e(e){e=i("<div>",{id:"wp-a11y-speak-"+(e=e||"polite"),"aria-live":e,"aria-relevant":"additions text","aria-atomic":"true",class:"screen-reader-text wp-a11y-speak-region"});return i(document.body).append(e),e}i(document).ready(function(){n=i("#wp-a11y-speak-polite"),s=i("#wp-a11y-speak-assertive"),n.length||(n=e("polite")),s.length||(s=e("assertive"))}),a.a11y=a.a11y||{},a.a11y.speak=function(e,t){i(".wp-a11y-speak-region").text(""),e=a.sanitize.stripTagsAndEncodeText(e),p===e&&(e+="\xa0"),p=e,s&&"assertive"===t?s.text(e):n&&n.text(e)}}(window.wp,window.jQuery); |