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

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

Issue 70213002: Update the accessibility tree when a modal dialog is opened/closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sync and remove inert-node-is-hidden.html 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
« no previous file with comments | « no previous file | LayoutTests/accessibility/inert-node-is-hidden-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.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 </body>
43 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/accessibility/inert-node-is-hidden-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698