676.html (1158B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA 1.0 Test Case 676</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 </head> 7 <body> 8 <h1>ARIA 1.0 Test Case 676</h1> 9 10 <div id="TEST_ID"> 11 </div> 12 13 <h2>Description</h2> 14 <p>An element without an aria-live attribute is defined in markup. 15 After the onload event completes a new element with an aria-live attribute with the 16 value 'assertive' is added to the document and a child element and text 17 node is added to the element with the aria-live attribute.</p> 18 19 <script> 20 21 function addElement() { 22 var node = document.getElementById('TEST_ID'); 23 var element_node = document.createElement('span'); 24 element_node.setAttribute('aria-live','assertive'); 25 var text_node = document.createTextNode('Text added in a span element on load'); 26 element_node.appendChild(text_node); 27 node.appendChild(element_node); 28 } 29 30 function onload() { 31 setTimeout(addElement,1000); 32 } 33 34 window.addEventListener('load', onload); 35 </script> 36 </body> 37 38 </html>