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