| OLD | NEW |
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 <div class="container"> | 127 <div class="container"> |
| 128 <label>label-wrapping-text10<input id="text10" type="text" title="text10-tit
le" placeholder="text10-placeholder"> | 128 <label>label-wrapping-text10<input id="text10" type="text" title="text10-tit
le" placeholder="text10-placeholder"> |
| 129 </label> | 129 </label> |
| 130 </div> | 130 </div> |
| 131 | 131 |
| 132 <script> | 132 <script> |
| 133 test(function(t) { | 133 test(function(t) { |
| 134 var axTextInput10 = accessibilityController.accessibleElementById("text10"); | 134 var axTextInput10 = accessibilityController.accessibleElementById("text10"); |
| 135 assert_equals(axTextInput10.name, "label-wrapping-text10"); | 135 assert_equals(axTextInput10.name, "label-wrapping-text10"); |
| 136 assert_equals(axTextInput10.nameFrom, "relatedElement"); | 136 assert_equals(axTextInput10.nameFrom, "relatedElement"); |
| 137 assert_equals(axTextInput10.description, "text10-placeholder"); | 137 assert_equals(axTextInput10.description, "text10-title"); |
| 138 assert_equals(axTextInput10.descriptionFrom, "placeholder"); | 138 assert_equals(axTextInput10.descriptionFrom, "attribute"); |
| 139 }, "Text input with placeholder and label-wrapped"); | 139 }, "Text input with placeholder and label-wrapped"); |
| 140 </script> | 140 </script> |
| 141 | 141 |
| 142 <div class="container"> | 142 <div class="container"> |
| 143 <input id="text11" type="text"> | 143 <input id="text11" type="text"> |
| 144 <label for="text11">first-label-for-text11</label> | 144 <label for="text11">first-label-for-text11</label> |
| 145 <label for="text11">second-label-for-text11</label> | 145 <label for="text11">second-label-for-text11</label> |
| 146 </div> | 146 </div> |
| 147 | 147 |
| 148 <script> | 148 <script> |
| 149 test(function(t) { | 149 test(function(t) { |
| 150 var axTextInput11 = accessibilityController.accessibleElementById("text11"); | 150 var axTextInput11 = accessibilityController.accessibleElementById("text11"); |
| 151 assert_equals(axTextInput11.name, | 151 assert_equals(axTextInput11.name, |
| 152 "first-label-for-text11 second-label-for-text11"); | 152 "first-label-for-text11 second-label-for-text11"); |
| 153 assert_equals(axTextInput11.nameFrom, "relatedElement"); | 153 assert_equals(axTextInput11.nameFrom, "relatedElement"); |
| 154 }, "Text input with multiple label-for"); | 154 }, "Text input with multiple label-for"); |
| 155 </script> | 155 </script> |
| 156 | 156 |
| 157 <div class="container"> |
| 158 <input id="text12" type="text" title="text12-title" aria-placeholder="text12
-aria-placeholder"> |
| 159 </div> |
| 160 |
| 161 <script> |
| 162 test(function(t) { |
| 163 var axTextInput12 = accessibilityController.accessibleElementById("text12"); |
| 164 assert_equals(axTextInput12.name, "text12-aria-placeholder"); |
| 165 assert_equals(axTextInput12.nameFrom, "placeholder"); |
| 166 }, "Text input with title and aria-placeholder"); |
| 167 </script> |
| 168 |
| 169 <div class="container"> |
| 170 <input id="text13" type="text" title="text13-title" aria-placeholder="text13
-aria-placeholder" placeholder="text13-placeholder"> |
| 171 </div> |
| 172 |
| 173 <script> |
| 174 test(function(t) { |
| 175 var axTextInput13 = accessibilityController.accessibleElementById("text13"); |
| 176 assert_equals(axTextInput13.name, "text13-placeholder"); |
| 177 assert_equals(axTextInput13.nameFrom, "placeholder"); |
| 178 }, "Text input with title and aria-placeholder"); |
| 179 </script> |
| 180 |
| 157 <script> | 181 <script> |
| 158 if (window.testRunner) | 182 if (window.testRunner) |
| 159 document.body.className = "hideAllContainers"; | 183 document.body.className = "hideAllContainers"; |
| 160 </script> | 184 </script> |
| OLD | NEW |