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