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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html

Issue 1939303002: Enable accessible name of a control to include multiple <label> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html b/third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html
index 3dc7b0932a8434dfe31939aa68f201b36ff2696a..c2d0cd2ee3b1b411112ae0dd25a4d82f47d894f0 100644
--- a/third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html
+++ b/third_party/WebKit/LayoutTests/accessibility/name-calc-inputs.html
@@ -112,15 +112,14 @@ test(function(t) {
<div class="container">
<label for="text9">label-for-text9</label>
- <label>label-wrapping-text9
- <input id="text9" type="text" title="text9-title" placeholder="text9-placeholder">
- </label>
+ <label>label-wrapping-text9<input id="text9" type="text" title="text9-title" placeholder="text9-placeholder"></label>
</div>
<script>
test(function(t) {
var axTextInput9 = accessibilityController.accessibleElementById("text9");
- assert_equals(axTextInput9.name, "label-for-text9");
+ assert_equals(axTextInput9.name,
+ "label-for-text9 label-wrapping-text9");
assert_equals(axTextInput9.nameFrom, "relatedElement");
}, "Text input with title, placeholder, label-for and label-wrapped");
</script>
@@ -140,6 +139,20 @@ test(function(t) {
}, "Text input with placeholder and label-wrapped");
</script>
+<div class="container">
+ <input id="text11" type="text">
+ <label for="text11">first-label-for-text11</label>
+ <label for="text11">second-label-for-text11</label>
+</div>
+
+<script>
+test(function(t) {
+ var axTextInput11 = accessibilityController.accessibleElementById("text11");
+ assert_equals(axTextInput11.name,
+ "first-label-for-text11 second-label-for-text11");
+ assert_equals(axTextInput11.nameFrom, "relatedElement");
+}, "Text input with multiple label-for");
+</script>
<script>
if (window.testRunner)

Powered by Google App Engine
This is Rietveld 408576698