Ticket #36853: 36853.diff
File 36853.diff, 964 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/js/wp-a11y.js
4 4 'use strict'; 5 5 6 6 var $containerPolite, 7 $containerAssertive; 7 $containerAssertive, 8 previousMessage = ''; 8 9 9 10 /** 10 11 * Update the ARIA live notification area text node. … … 23 24 // Ensure only text is sent to screen readers. 24 25 message = $( '<p>' ).html( message ).text(); 25 26 27 /* 28 * Safari 10+VoiceOver don't announce repeated, identical strings. We use 29 * a `no-break space` to force them to think identical strings are different. 30 * See ticket #36853. 31 */ 32 if ( previousMessage === message ) { 33 message = message + '\u00A0'; 34 } 35 36 previousMessage = message; 37 26 38 if ( $containerAssertive && 'assertive' === ariaLive ) { 27 39 $containerAssertive.text( message ); 28 40 } else if ( $containerPolite ) {