715.html (1271B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA 1.0 Test Case 715</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 </head> 7 <body> 8 <h1>ARIA 1.0 Test Case 715</h1> 9 10 <div id="TEST_ID_1"> 11 </div> 12 13 <h2>Description</h2> 14 <p>The aria-live attribute is added to an element in the document by a script 15 after the onload event completes with the value="polite" and the element has 16 a child DOM element node that contains text content. After the aria-live 17 attribute is added, the child DOM element node is deleted.</p> 18 19 <script> 20 21 function deleteChildNodes() { 22 var node = document.getElementById('TEST_ID_1'); 23 while (node.firstChild) node.removeChild(node.firstChild); 24 } 25 26 function addLiveRegion() { 27 var node = document.getElementById('TEST_ID_1'); 28 29 node.setAttribute('aria-live', 'polite'); 30 31 var text_node = document.createTextNode('TEST TEXT'); 32 33 node.appendChild(text_node); 34 35 setTimeout(deleteChildNodes,500); 36 } 37 38 function onload() { 39 setTimeout(addLiveRegion,1000); 40 } 41 42 window.addEventListener('load', onload); 43 </script> 44 </body> 45 46 </html>