692.html (1390B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA 1.0 Test Case 692</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 </head> 7 <body> 8 <h1>ARIA 1.0 Test Case 692</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 after 15 the onload event completes with the value="assertive". After the aria-live attribute 16 is added, a child DOM element node is added to the element with the aria-live attribute.</p> 17 18 <script> 19 20 function addChildElementNode() { 21 var node = document.getElementById('TEST_ID_2'); 22 var element_node = document.createElement('div'); 23 element_node.setAttribute('aria-live', 'polite'); 24 node.appendChild(element_node); 25 } 26 27 function addLiveRegion() { 28 var node = document.getElementById('TEST_ID_1'); 29 var element_node = document.createElement('div'); 30 element_node.setAttribute('id', 'TEST_ID_2'); 31 element_node.setAttribute('aria-live', 'assertive'); 32 node.appendChild(element_node); 33 setTimeout(addChildElementNode,500); 34 } 35 36 function onload() { 37 setTimeout(addLiveRegion,1000); 38 } 39 40 window.addEventListener('load', onload); 41 </script> 42 </body> 43 44 </html>