Index: third_party/WebKit/LayoutTests/accessibility/aria-row-name.html |
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-row-name.html b/third_party/WebKit/LayoutTests/accessibility/aria-row-name.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3a0d5fa1697b0e99bd35e332b014b970b5f071fe |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-row-name.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE HTML> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<body id="body"> |
+<div role="treegrid"> |
+ <div role="row" id="treegrid1-row1" tabindex="-1"> |
+ <div role="rowheader">row head</div> |
+ <div role="gridcell">data</div> |
+ </div> |
+</div> |
+<div role="treegrid" aria-activedescendant="treegrid2-row1"> |
+ <div role="row" id="treegrid2-row1"> |
+ <div role="rowheader">row head</div> |
+ <div role="gridcell">data</div> |
+ </div> |
+</div> |
+</body> |
+ |
+<script> |
+function axElementById(id) { |
+ return accessibilityController.accessibleElementById(id); |
+} |
+ |
+test(function(t) { |
+ var axRow = axElementById("treegrid1-row1"); |
+ assert_equals(axRow.name, 'row head data'); |
+}, "The row's name must concatenate the children if the row is focusable"); |
+ |
+test(function(t) { |
dmazzoni
2017/04/10 16:32:12
It's probably good to have a negative test, too -
aleventhal
2017/04/10 17:19:00
Done.
|
+ var axRow = axElementById("treegrid2-row1"); |
+ assert_equals(axRow.name, 'row head data'); |
+}, "The row's name must concatenate the children if the parent has aria-activedescendant"); |
+ |
+</script> |