Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/aria-option-role.html

Issue 2893683002: Selection follows focus/activedescendant in single selection containers (Closed)
Patch Set: Last test to fix we hope Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body id="body"> 6 <body id="body">
7 7
8 <div role="listbox"> 8 <div role="listbox">
9 <div role="option">option 1</div> 9 <div role="option" tabindex="-1">option 1</div>
10 <div role="option" aria-label="label 2">option 2</div> 10 <div role="option" aria-label="label 2">option 2</div>
11 </div> 11 </div>
12 12
13 <p id="description"></p> 13 <p id="description"></p>
14 <div id="console"></div> 14 <div id="console"></div>
15 15
16 <script> 16 <script>
17 17
18 description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children."); 18 description("This tests that the aria 'option' role works as expected. That is, it becomes a static text element with no children.");
19 19
20 if (window.accessibilityController) { 20 if (window.accessibilityController) {
21 21
22 var body = document.getElementById("body"); 22 var body = document.getElementById("body");
23 body.focus(); 23 body.focus();
24 24
25 var listBox = accessibilityController.focusedElement.childAtIndex(0); 25 var listBox = accessibilityController.focusedElement.childAtIndex(0);
26 var firstChild = listBox.childAtIndex(0); 26 var firstChild = listBox.childAtIndex(0);
27 var secondChild = listBox.childAtIndex(1); 27 var secondChild = listBox.childAtIndex(1);
28 debug("firstChild.role is " + firstChild.role); 28 debug("firstChild.role is " + firstChild.role);
29 shouldBe("firstChild.name", "'option 1'"); 29 shouldBe("firstChild.name", "'option 1'");
30 30
31 debug("secondChild.role is " + secondChild.role); 31 debug("secondChild.role is " + secondChild.role);
32 shouldBe("secondChild.name", "'label 2'"); 32 shouldBe("secondChild.name", "'label 2'");
33 33
34 shouldBe("firstChild.childrenCount", "0"); 34 shouldBe("firstChild.childrenCount", "0");
35 shouldBe("secondChild.childrenCount", "0"); 35 shouldBe("secondChild.childrenCount", "0");
36
37 shouldBe("firstChild.isFocusable", "true");
36 } 38 }
37 39
38 </script> 40 </script>
39 41
40 </body> 42 </body>
41 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698