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

Side by Side Diff: LayoutTests/accessibility/inert-node-is-hidden.html

Issue 51743003: Treat inert nodes as aria-hidden instead of aria-disabled. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7 This content should not be exposed to AT when a modal dialog is open.
8 <div>
9 <input title="input" id="input" type="text">
10 </div>
11 <dialog title="dialog" id="dialog">Howdy</dialog>
12
13 <script>
14 description("This tests that inert elements are not in the AT tree.");
15
16 function treeContainsText(node, text) {
17 if (node.stringValue.indexOf(text) > 0)
18 return true;
19 for (i = 0; i < node.childrenCount; i++) {
20 if (treeContainsText(node.childAtIndex(i), text))
21 return true;
22 }
23 return false;
24 }
25
26 if (window.accessibilityController) {
27 document.body.focus();
28 webArea = accessibilityController.focusedElement;
29
30 shouldBeNonNull("accessibilityController.accessibleElementById('input')");
31 shouldBeTrue("treeContainsText(webArea, 'This content should not be exposed to AT when a modal dialog is open')");
32
33 document.querySelector('dialog').showModal();
34 shouldBeNull("accessibilityController.accessibleElementById('input')");
35 shouldBeFalse("treeContainsText(webArea, 'This content should not be exposed to AT when a modal dialog is open')");
36
37 document.querySelector('dialog').close();
38 shouldBeNonNull("accessibilityController.accessibleElementById('input')");
39 shouldBeTrue("treeContainsText(webArea, 'This content should not be exposed to AT when a modal dialog is open')");
40 }
41 </script>
42 <script src="../fast/js/resources/js-test-post.js"></script>
43 </body>
44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698