| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| <html> | |
| <head> | |
| <script src="../../resources/js-test.js"></script> | |
| </head> | |
| <body id="body"> | |
| <a href="#">link</a><br> | |
| <div role="text" aria-label="text" tabindex=0>text</div> | |
| <div role="alertdialog" tabindex="0">foo</div> | |
| <p id="description"></p> | |
| <div id="console"></div> | |
| <script> | |
| description("This tests that any element that supports focus has a writable AXFocused"); | |
| if (window.accessibilityController) { | |
| var root = accessibilityController.rootElement; | |
| var body = root.childAtIndex(0); | |
| shouldBe("body.childAtIndex(0).role", "'AXRole: AXLink'"); | |
| shouldBe("body.childAtIndex(0).isAttributeSettable('AXFocused')", "true"); | |
| shouldBe("body.childAtIndex(1).role", "'AXRole: AXStaticText'"); | |
| shouldBe("body.childAtIndex(1).isAttributeSettable('AXFocused')", "true"); | |
| shouldBe("body.childAtIndex(2).role", "'AXRole: AXGroup'"); | |
| shouldBe("body.childAtIndex(2).isAttributeSettable('AXFocused')", "true"); | |
| } | |
| </script> | |
| </body> | |
| </html> |