add test case 849
authorRichard Schwerdtfeger <schwer@us.ibm.com>
Mon, 24 Jun 2013 15:46:08 -0500
changeset 253 9785403c4839
parent 252 1bb8b657686c
child 254 23bbc59df68a
add test case 849
ARIA/1.0/tests/test-files/testcases-multiselectable/testcase-multiselectable-D.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ARIA/1.0/tests/test-files/testcases-multiselectable/testcase-multiselectable-D.html	Mon Jun 24 15:46:08 2013 -0500
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+    <title>ARIA 1.0 Test Case: Listbox role with multiseclect</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <style type="text/css">
+      div[aria-selected="true"] {color:white;background-color:black;}
+    </style>
+  </head>
+  <body>
+    <h1>ARIA 1.0 Test Case: Listbox role with multiseclect</h1>
+        
+    <div role="listbox" aria-multiselect="true">
+      <div role="option" aria-selected="false" id="ID1" tabindex="-1" onclick="handle1()">Option 1 (test for click elected)</div> 
+      <div role="option  aria-selected="false" id="ID2"="-1" tabindex="-1">Option 2</div>
+      <div role="option" aria-selected="false" id="ID3" onmousedown="handle2(event)">Option 3 (test for shift click selected)</div> 
+    </div>
+    
+    <script type="text/javascript">  
+     function handle1() {
+        node.focus();
+     }
+     function handle2(e) {
+        shiftpressed=0;
+        shiftpressed=e.shiftKey;
+        if (shiftpressed){
+           var node=document.getElementById('ID1');
+           node.setAttribute("aria-selected", "true");
+           node=document.getElementById('ID2');
+           node.setAttribute("aria-selected", "true");
+           node=document.getElementById('ID3');
+           node.focus();
+           node.setAttribute("aria-selected", "true");
+        }
+        e.stopPropagation();
+        return false;
+     }
+    </script>
+  
+  
+
+
+</body></html>