713.html (1565B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA 1.0 Test Case 713</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 </head> 7 <body> 8 <h1>ARIA 1.0 Test Case 713</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 15 script after the onload event completes with the value="polite" and 16 the element has a child DOM text node with content. After the 17 aria-live attribute is added, the child DOM text node is deleted.</p> 18 19 <script> 20 21 22 function deleteChildNodes() { 23 var node = document.getElementById('TEST_ID_2'); 24 while (node.firstChild) node.removeChild(node.firstChild); 25 } 26 27 function addLiveRegion() { 28 var node = document.getElementById('TEST_ID_1'); 29 30 var live_node = document.createElement('div'); 31 live_node.setAttribute('aria-live', 'polite'); 32 live_node.setAttribute('id', 'TESTZ'); 33 34 var element_node = document.createElement('div'); 35 element_node.setAttribute('id', 'TEST_ID_2'); 36 37 var text_node = document.createTextNode('TEST TEXT'); 38 39 element_node.appendChild(text_node); 40 live_node.appendChild(element_node); 41 node.appendChild(live_node); 42 43 setTimeout(deleteChildNodes,1000); 44 } 45 46 function onload() { 47 setTimeout(addLiveRegion, 1000); 48 } 49 50 window.addEventListener('load', onload); 51 </script> 52 </body> 53 54 </html>