test-case-live-event-4.html (1788B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ARIA 1.0 Live Region Event Test Case: Add text content (ALERT role)</title> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 <style> 7 div#TEST_ID { 8 margin: 0.5em; 9 padding: 0.25em; 10 border: medium gray solid; 11 width: 20em; 12 } 13 </style> 14 </head> 15 <body> 16 <h1>ARIA 1.0 Live Region Event Test Case: Add text content (ALERT role)</h1> 17 18 <div id="TEST_ID" role="alert" > 19 </div> 20 21 <button onclick="tryAgain()">Try Again</button> 22 23 <h2>Description</h2> 24 <p>An element with an role attribute with the value "alert" has a text content added 25 1.5 seconds after the document is loaded.</p> 26 27 <h2>Expected Results</h2> 28 29 <dl> 30 <dt>ATK/AT-SPI</dt> 31 <dd>ATK/AT-SPIevent: text_changed::insert event</dd> 32 33 <dt>AXAPI</dt> 34 <dd>AXLiveRegionChanged notification</dd> 35 36 <dt>MSAA + IAccessible2</dt> 37 <dd>IAccessible2: IA2_EVENT_TEXT_INSERTED event</dd> 38 39 <dt>MSAA + UIA Express</dt> 40 <dd>TextPattern..::.TextChangedEvent event</dd> 41 42 </dl> 43 44 45 <script> 46 47 function tryAgain() { 48 var node = document.getElementById('TEST_ID'); 49 50 while (node.firstChild) node.removeChild(node.firstChild); 51 52 onLoad(); 53 54 } 55 56 function addText () { 57 var node = document.getElementById('TEST_ID'); 58 59 var text_node = document.createTextNode('ALERT ROLE TEST TEXT ADDED'); 60 61 node.appendChild(text_node); 62 } 63 64 function onLoad() { 65 66 setTimeout(addText,1500); 67 68 } 69 70 window.addEventListener('load', onLoad); 71 </script> 72 </body> 73 74 </html>