| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../../resources/accessibility-helper.js"></script> |
| <button id="button">Click</button> |
| description("This tests that dispatching accessibility events is controled by iOS settings."); |
| if (window.accessibilityController) { |
| var node = document.getElementById("button"); |
| var axNode = accessibilityController.accessibleElementById("button"); |
| node.onaccessibleclick = function() { |
| // By default, accessibility events setting is enabled. |
| shouldBeTrue("receivedAXEvent"); |
| window.internals.settings.setAccessibilityEventsEnabled(false); |
| shouldBeFalse("receivedAXEvent"); |
| // Re-enable the setting. |
| window.internals.settings.setAccessibilityEventsEnabled(true); |
| shouldBeTrue("receivedAXEvent"); |
| <script src="../../resources/js-test-post.js"></script> |