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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/name-calc-aria-hidden.html

Issue 1917943002: Accessible name calc should allow aria-labelledby to reference aria-hidden (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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <style>
6 .hideAllContainers .container {
7 display: none;
8 }
9 </style>
10
11 <div class="container">
12 <h3 id="heading1">
13 Before
14 <p id="hidden1" aria-hidden="true">Hidden text</p>
15 After
16 </h3>
17 <button id="button1" aria-labelledby="hidden1"></button>
18 </div>
19
20 <script>
21 test(function(t) {
22 var axHeading1 = accessibilityController.accessibleElementById("heading1");
23 assert_equals(axHeading1.name, "Before After");
24 var axButton1 = accessibilityController.accessibleElementById("button1");
25 assert_equals(axButton1.name, "Hidden text");
26 }, "Aria-labelledby can get accessible text from aria-hidden subtree");
aboxhall 2016/04/25 18:21:25 For completeness, could we have a test where aria-
dmazzoni 2016/04/25 22:33:03 Sure, done. See below:
27 </script>
28
29 <div class="container">
30 <h3 id="heading2">
31 Before
32 <p id="hidden2" aria-hidden="true">Hidden text</p>
33 After
34 </h3>
35 <button id="button2" aria-labelledby="heading2"></button>
36 </div>
37
38 <script>
39 test(function(t) {
40 var axHeading2 = accessibilityController.accessibleElementById("heading2");
41 assert_equals(axHeading2.name, "Before After");
42 var axButton2 = accessibilityController.accessibleElementById("button2");
43 assert_equals(axButton2.name, "Before After");
44 }, "Aria-labelledby ignores accessible text that's aria-hidden inside subtree");
45 </script>
46
47 <script>
48 if (window.testRunner)
49 document.body.className = "hideAllContainers";
50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698