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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/description-calc-aria-describedby.html

Issue 2867073003: Name calculation should not include nameFrom:author descendants. (Closed)
Patch Set: Rebase 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> 1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <style> 5 <style>
6 .hideAllContainers .container { 6 .hideAllContainers .container {
7 display: none; 7 display: none;
8 } 8 }
9 </style> 9 </style>
10 10
(...skipping 28 matching lines...) Expand all
39 </div> 39 </div>
40 40
41 <script> 41 <script>
42 test(function(t){ 42 test(function(t){
43 var axDescribedby = accessibilityController.accessibleElementById("described by"); 43 var axDescribedby = accessibilityController.accessibleElementById("described by");
44 assert_equals(axDescribedby.name, "Contents"); 44 assert_equals(axDescribedby.name, "Contents");
45 assert_equals(axDescribedby.nameFrom, "contents"); 45 assert_equals(axDescribedby.nameFrom, "contents");
46 assert_equals(axDescribedby.description, "Description 1"); 46 assert_equals(axDescribedby.description, "Description 1");
47 assert_equals(axDescribedby.descriptionFrom, "relatedElement"); 47 assert_equals(axDescribedby.descriptionFrom, "relatedElement");
48 assert_equals(axDescribedby.descriptionElementCount(), 1); 48 assert_equals(axDescribedby.descriptionElementCount(), 1);
49 assert_equals(axDescribedby.descriptionElementAtIndex(0).role, "AXRole: AXDi v"); 49 assert_equals(axDescribedby.descriptionElementAtIndex(0).role, "AXRole: AXGe nericContainer");
50 }, "Button with aria-describedby referencing the id of another element."); 50 }, "Button with aria-describedby referencing the id of another element.");
51 </script> 51 </script>
52 52
53 <div class="container"> 53 <div class="container">
54 <button id="describedby2" aria-describedby="describedby2">Contents</button> 54 <button id="describedby2" aria-describedby="describedby2">Contents</button>
55 </div> 55 </div>
56 56
57 <script> 57 <script>
58 test(function(t){ 58 test(function(t){
59 var axDescribedby2 = accessibilityController.accessibleElementById("describe dby2"); 59 var axDescribedby2 = accessibilityController.accessibleElementById("describe dby2");
(...skipping 13 matching lines...) Expand all
73 73
74 <script> 74 <script>
75 test(function(t){ 75 test(function(t){
76 var axDescribedby3 = accessibilityController.accessibleElementById("describe dby3"); 76 var axDescribedby3 = accessibilityController.accessibleElementById("describe dby3");
77 assert_equals(axDescribedby3.name, "Contents"); 77 assert_equals(axDescribedby3.name, "Contents");
78 assert_equals(axDescribedby3.nameFrom, "contents"); 78 assert_equals(axDescribedby3.nameFrom, "contents");
79 assert_equals(axDescribedby3.description, "Contents Description 3"); 79 assert_equals(axDescribedby3.description, "Contents Description 3");
80 assert_equals(axDescribedby3.descriptionFrom, "relatedElement"); 80 assert_equals(axDescribedby3.descriptionFrom, "relatedElement");
81 assert_equals(axDescribedby3.descriptionElementCount(), 2); 81 assert_equals(axDescribedby3.descriptionElementCount(), 2);
82 assert_equals(axDescribedby3.descriptionElementAtIndex(0).role, "AXRole: AXB utton"); 82 assert_equals(axDescribedby3.descriptionElementAtIndex(0).role, "AXRole: AXB utton");
83 assert_equals(axDescribedby3.descriptionElementAtIndex(1).role, "AXRole: AXD iv"); 83 assert_equals(axDescribedby3.descriptionElementAtIndex(1).role, "AXRole: AXG enericContainer");
84 }, "Button with aria-describedby referencing itself and the id of another elemen t."); 84 }, "Button with aria-describedby referencing itself and the id of another elemen t.");
85 </script> 85 </script>
86 86
87 <div class="container"> 87 <div class="container">
88 <button id="describedby4" aria-describedby="description4">Contents</button> 88 <button id="describedby4" aria-describedby="description4">Contents</button>
89 </div> 89 </div>
90 90
91 <script> 91 <script>
92 test(function(t){ 92 test(function(t){
93 var axDescribedby4 = accessibilityController.accessibleElementById("describe dby4"); 93 var axDescribedby4 = accessibilityController.accessibleElementById("describe dby4");
(...skipping 11 matching lines...) Expand all
105 </div> 105 </div>
106 106
107 <script> 107 <script>
108 test(function(t){ 108 test(function(t){
109 var axDescribedby5 = accessibilityController.accessibleElementById("describe dby5"); 109 var axDescribedby5 = accessibilityController.accessibleElementById("describe dby5");
110 assert_equals(axDescribedby5.name, "Contents"); 110 assert_equals(axDescribedby5.name, "Contents");
111 assert_equals(axDescribedby5.nameFrom, "contents"); 111 assert_equals(axDescribedby5.nameFrom, "contents");
112 assert_equals(axDescribedby5.description, ""); 112 assert_equals(axDescribedby5.description, "");
113 assert_equals(axDescribedby5.descriptionFrom, "relatedElement"); 113 assert_equals(axDescribedby5.descriptionFrom, "relatedElement");
114 assert_equals(axDescribedby5.descriptionElementCount(), 1); 114 assert_equals(axDescribedby5.descriptionElementCount(), 1);
115 assert_equals(axDescribedby5.descriptionElementAtIndex(0).role, "AXRole: AXD iv"); 115 assert_equals(axDescribedby5.descriptionElementAtIndex(0).role, "AXRole: AXG enericContainer");
116 }, "aria-describedby reference to element with no text."); 116 }, "aria-describedby reference to element with no text.");
117 </script> 117 </script>
118 118
119 <div class="container"> 119 <div class="container">
120 <button id="describedby6" aria-describedby="description6">Contents</button> 120 <button id="describedby6" aria-describedby="description6">Contents</button>
121 <h3 id="description6" style="visibility: hidden">Invisible description</h3> 121 <h3 id="description6" style="visibility: hidden">Invisible description</h3>
122 </div> 122 </div>
123 123
124 <script> 124 <script>
125 test(function(t){ 125 test(function(t){
(...skipping 23 matching lines...) Expand all
149 assert_equals(axDescribedby7.descriptionFrom, "relatedElement"); 149 assert_equals(axDescribedby7.descriptionFrom, "relatedElement");
150 assert_equals(axDescribedby7.descriptionElementCount(), 1); 150 assert_equals(axDescribedby7.descriptionElementCount(), 1);
151 assert_equals(axDescribedby7.descriptionElementAtIndex(0).role, "AXRole: AXH eading"); 151 assert_equals(axDescribedby7.descriptionElementAtIndex(0).role, "AXRole: AXH eading");
152 }, "Button with aria-describedby reference to display-none element."); 152 }, "Button with aria-describedby reference to display-none element.");
153 </script> 153 </script>
154 154
155 <script> 155 <script>
156 if (window.testRunner) 156 if (window.testRunner)
157 document.body.className = "hideAllContainers"; 157 document.body.className = "hideAllContainers";
158 </script> 158 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698