| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/accessibility-helper.js"></script> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <body id="body" role="group"> |
| |
| <iframe aria-hidden="true" id="iframe" src="resources/cake.png" width="400" height="500" scrolling="auto" frameborder="1">fall back content</iframe> |
| |
| <input type="text" aria-label="Non-hidden textbox"> |
| |
| <script> |
| var output = "This tests that aria-hidden will affect the visibility of the web area and scroll view.\n\n"; |
| |
| if (window.accessibilityController) { |
| window.jsTestIsAsync = true; |
| |
| var body = accessibilityController.accessibleElementById("body"); |
| output += expect("body.childrenCount", "1"); |
| output += expect("body.childAtIndex(0).role", "'AXRole: AXTextField'"); |
| window.onload = async function() { |
| document.getElementById("iframe").setAttribute("aria-hidden", "false"); |
| document.getElementById("iframe").contentWindow.document.body.offsetWidth; |
| document.body.offsetWidth; |
| |
| output += await expectAsync("body.childrenCount", "2"); |
| output += await expectAsync("body.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXWebArea'"); |
| |
| debug(output); |
| finishJSTest(); |
| } |
| } |
| </script> |
| </body> |
| </html> |
| |