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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label.html

Issue 1417213006: Switch all LayoutTests to use new AX name calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix canvas-fallback-content-labels-expected.txt Created 5 years, 1 month 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 <span id="labelShutdown"><label id="labelElement" for="shutdownTime">Shut down c omputer after</label></span> 8 <label for="target">Label</label>
9 <input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown s hutdownTime shutdownUnit" /> 9
10 <span id="shutdownUnit">minutes</span> 10 <div id="a">A</div>
11 <div id="b">B</div>
12 <div id="c">C</div>
13
14 <input id="target" aria-labelledby="a b c" value="10">
11 15
12 <p id="description"></p> 16 <p id="description"></p>
13 <div id="console"></div> 17 <div id="console"></div>
14 18
15 <script> 19 <script>
16 20
17 description("This tests that if aria-labelledby is used, then label elements are not used"); 21 description("This tests that if aria-labelledby is used, then label elements are not used");
18 22
19 if (window.accessibilityController) { 23 if (window.accessibilityController) {
20 24 var axTarget = accessibilityController.accessibleElementById("target") ;
21 var text = document.getElementById("shutdownTime"); 25 shouldBe("axTarget.name", "'A B C'");
22 text.focus(); 26 shouldBe("axTarget.nameElementCount()", "3");
23 text = accessibilityController.focusedElement;
24
25 shouldBe("text.deprecatedDescription", "'AXDescription: Shut down comp uter after 10 minutes'");
26
27 // There should be no title UI element.
28 shouldBe("text.deprecatedTitleUIElement() != null && text.deprecatedTi tleUIElement().isValid", "false");
29
30 var labelElement = accessibilityController.accessibleElementById("labe lElement");
31 // This just makes sure that the label element is still visible in the AX hierarchy, even though
32 // it's a label element (sometimes they are ignored).
33 debug("Label element role is: " + labelElement.role);
34 } 27 }
35 28
36 </script> 29 </script>
37 30
38 </body> 31 </body>
39 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698