Title: [219906] trunk
Revision
219906
Author
n_w...@apple.com
Date
2017-07-26 00:39:01 -0700 (Wed, 26 Jul 2017)

Log Message

AX: should dispatch accessibilityPerformPressAction async on MacOS
https://bugs.webkit.org/show_bug.cgi?id=174849

Reviewed by Chris Fleizach.

Source/WebCore:

If performing the accessibility press action results in a modal alert being displayed,
it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously.

Updated tests to adapt to this change.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
(-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):

LayoutTests:

* accessibility/file-upload-button-with-axpress.html:
* accessibility/mac/html5-input-number.html:
* accessibility/mac/search-field-cancel-button.html:
* accessibility/press-target-uses-text-descendant-node.html:
* accessibility/press-targets-center-point.html:
* accessibility/press-works-on-control-types.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (219905 => 219906)


--- trunk/LayoutTests/ChangeLog	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/ChangeLog	2017-07-26 07:39:01 UTC (rev 219906)
@@ -1,3 +1,17 @@
+2017-07-26  Nan Wang  <n_w...@apple.com>
+
+        AX: should dispatch accessibilityPerformPressAction async on MacOS
+        https://bugs.webkit.org/show_bug.cgi?id=174849
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/file-upload-button-with-axpress.html:
+        * accessibility/mac/html5-input-number.html:
+        * accessibility/mac/search-field-cancel-button.html:
+        * accessibility/press-target-uses-text-descendant-node.html:
+        * accessibility/press-targets-center-point.html:
+        * accessibility/press-works-on-control-types.html:
+
 2017-07-25  Andy Estes  <aes...@apple.com>
 
         [Apple Pay] Add "carteBancaire" as a supported payment network

Modified: trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -19,7 +19,9 @@
 
     inputFile.addEventListener("DOMActivate", function() { 
         debug("DOMActivate was called"); 
-        finishJSTest();
+        setTimeout(function() {
+            finishJSTest();
+        }, 10);
     });
 
     accessibilityController.accessibleElementById("filetype").press();

Modified: trunk/LayoutTests/accessibility/mac/html5-input-number.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/mac/html5-input-number.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/mac/html5-input-number.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -17,9 +17,10 @@
     description("This tests that input type='number' exposes the accessibility of it's stepper correctly");
 
     if (window.accessibilityController) {
-
+        window.jsTestIsAsync = true;
+        
         document.getElementById("number").focus();
-        var textfield = accessibilityController.focusedElement;
+        var textfield = accessibilityController.accessibleElementById("number");
 
         // Verify that the click point is the same as the child.
         shouldBe("textfield.childrenCount", "1");
@@ -39,17 +40,21 @@
 
         // Increment.
         incrementor.childAtIndex(0).press();
-        shouldBe("textfield.stringValue", "'AXValue: 1'");
-
-        shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
-        shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
-        shouldBeTrue("incrementor.childAtIndex(1).width > 0");
-        shouldBeTrue("incrementor.childAtIndex(1).height > 0");
-        shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
-
-        // Decrement.
-        incrementor.childAtIndex(1).press();
-        shouldBe("textfield.stringValue", "'AXValue: 0'");
+        setTimeout(function() {
+            shouldBe("textfield.stringValue", "'AXValue: 1'");
+            shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
+            shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
+            shouldBeTrue("incrementor.childAtIndex(1).width > 0");
+            shouldBeTrue("incrementor.childAtIndex(1).height > 0");
+            shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
+            
+            // Decrement.
+            incrementor.childAtIndex(1).press();
+            setTimeout(function() {
+                shouldBe("textfield.stringValue", "'AXValue: 0'");
+                finishJSTest();
+            }, 10);
+        }, 10);
     }
 
 </script>

Modified: trunk/LayoutTests/accessibility/mac/search-field-cancel-button.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/mac/search-field-cancel-button.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/mac/search-field-cancel-button.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -15,6 +15,8 @@
     description("This tests that the search field cancel button is exposed correctly.");
     
     if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+    
         var button = accessibilityController.accessibleElementById("search").childAtIndex(1);
         
         shouldBe("button.description", "'AXDescription: cancel'");
@@ -25,9 +27,11 @@
         shouldBe("document.getElementById('search').value", "'X'");
         
         button.press();
-        
-        // Search field has no value after press.
-        shouldBe("document.getElementById('search').value", "''");
+        setTimeout(function() {
+            // Search field has no value after press.
+            shouldBe("document.getElementById('search').value", "''");
+            finishJSTest();
+        }, 10);
     }
 </script>
 

Modified: trunk/LayoutTests/accessibility/mac/search-predicate.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/mac/search-predicate.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/mac/search-predicate.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -61,6 +61,7 @@
     description("This tests the ability to search for accessible elements by key or text.");
     
     if (window.accessibilityController) {
+        jsTestIsAsync = true;
         window.testRunner.keepWebHistory();
         
         document.getElementById("body").focus();
@@ -277,102 +278,106 @@
         
         // Visited link.
         accessibilityController.focusedElement.childAtIndex(14).childAtIndex(0).press();
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXVisitedLinkSearchKey", "", false);
-        shouldBe("resultElement.boolAttributeValue('AXVisited')", "true");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
+        setTimeout(function() {
+            
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXVisitedLinkSearchKey", "", false);
+            shouldBe("resultElement.boolAttributeValue('AXVisited')", "true");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
         
-        // Previous text search.
-        startElement = accessibilityController.focusedElement.childAtIndex(10);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, false, "", "sans-serif black bold text with underline", false);
-        shouldBe("resultElement.role", "'AXRole: AXStaticText'");
-        shouldBe("resultElement.stringValue", "'AXValue: sans-serif black bold text with underline'");
+            // Previous text search.
+            startElement = accessibilityController.focusedElement.childAtIndex(10);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, false, "", "sans-serif black bold text with underline", false);
+            shouldBe("resultElement.role", "'AXRole: AXStaticText'");
+            shouldBe("resultElement.stringValue", "'AXValue: sans-serif black bold text with underline'");
         
-        // Execute a search for the next heading level 2 or the next link.
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
+            // Execute a search for the next heading level 2 or the next link.
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
         
-        // After finding the heading, execute the search again and we should find the link.
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXLink'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
+            // After finding the heading, execute the search again and we should find the link.
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXLink'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
 
-        // From the link, execute the search in reverse and we should land back on the heading.
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, false, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
+            // From the link, execute the search in reverse and we should land back on the heading.
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, false, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
                
-        // Now, we need to test isVisible. Save off the first object
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
+            // Now, we need to test isVisible. Save off the first object
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
         
-        // Scroll all the way to the bottom of the content
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "test button 3", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
-        resultElement.scrollToMakeVisible();
+            // Scroll all the way to the bottom of the content
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "test button 3", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement.scrollToMakeVisible();
         
-        // find the start of the isVisible test section
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "isVisible test start", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: isVisible test start'");       
+            // find the start of the isVisible test section
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "isVisible test start", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: isVisible test start'");       
         
-        // save away the "isVisible test start" heading as the start element
-        startElement = resultElement;
+            // save away the "isVisible test start" heading as the start element
+            startElement = resultElement;
         
-        // If we don't care about visible only, then we should easily find 3 buttons
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 1'");
+            // If we don't care about visible only, then we should easily find 3 buttons
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 1'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        // save away testButton2 so we can make it visible later
-        testButton2 = resultElement;
+            // save away testButton2 so we can make it visible later
+            testButton2 = resultElement;
 
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
 
-        // if we care about visible only, then we should not find "test button 2"
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 1'");
+            // if we care about visible only, then we should not find "test button 2"
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 1'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
         
-        // now, scroll to the second button, and confirm that we don't see the first button
-        testButton2.scrollToMakeVisible();
+            // now, scroll to the second button, and confirm that we don't see the first button
+            testButton2.scrollToMakeVisible();
 
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
         
-        // Now since the page is scrolled to the bottom, the first visible button should be #2
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            // Now since the page is scrolled to the bottom, the first visible button should be #2
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        // lets scroll to the top of the page and ensure that the submit button is visible
-        startElement.scrollToMakeVisible();
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: Submit'");
+            // lets scroll to the top of the page and ensure that the submit button is visible
+            startElement.scrollToMakeVisible();
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: Submit'");
         
-        // there should be no more visible buttons
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBeUndefined("resultElement");
+            // there should be no more visible buttons
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBeUndefined("resultElement");
         
+            finishJSTest();
+        }, 50);
     }
     
 </script>

Modified: trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -40,9 +40,13 @@
 
     function startTest() {
        accessibilityController.accessibleElementById("link").press();
-       debug("\nNow pressing on button\n");
-       accessibilityController.accessibleElementById("button").press();
-       finishJSTest();
+       setTimeout(function() {
+           debug("\nNow pressing on button\n");
+           accessibilityController.accessibleElementById("button").press();
+           setTimeout(function() {
+               finishJSTest();
+           }, 10);
+       }, 10);
     }
 
     if (window.accessibilityController) {

Modified: trunk/LayoutTests/accessibility/press-targets-center-point.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/press-targets-center-point.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/press-targets-center-point.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -50,10 +50,21 @@
     }
     
     if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+        
         // Press all targets.
-        for (var i = 0; i < targetCount; ++i)
-            accessibilityController.accessibleElementById("t" + i).press();
+        accessibilityPress(0);
     }
+    
+    function accessibilityPress(i) {
+        if (i == targetCount)
+            finishJSTest();
+        
+        accessibilityController.accessibleElementById("t" + i).press();
+        setTimeout(function() {
+            accessibilityPress(i+1);
+        }, 10);
+    }
 </script>
 
 <script src=""

Modified: trunk/LayoutTests/accessibility/press-works-on-control-types.html (219905 => 219906)


--- trunk/LayoutTests/accessibility/press-works-on-control-types.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/accessibility/press-works-on-control-types.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -54,14 +54,24 @@
 
     description("This tests that when certain control type elements are pressed, a valid event is sent that references the right element.");
 
+    var items = new Array("group", "button", "tab", "radio", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "listitem", "button2");
+    var length = items.length;
+    
     if (window.accessibilityController) {
-
-        var items = new Array("group", "button", "tab", "radio", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "listitem", "button2");
-        for (var k = 0; k < items.length; k++) {
-           document.getElementById(items[k]).focus();
-           accessibilityController.focusedElement.press();
-        }
+        jsTestIsAsync = true;
+        // AXPress on Mac is async, let's give it some delay and do it recursively.
+        accessibilityPress(0);
     }
+    
+    function accessibilityPress(k) {
+        if (k == length)
+            finishJSTest();
+        
+        accessibilityController.accessibleElementById(items[k]).press();
+        setTimeout(function() {
+            accessibilityPress(k+1);
+        }, 10);
+    }
 
 </script>
 

Modified: trunk/LayoutTests/media/media-controls-accessibility.html (219905 => 219906)


--- trunk/LayoutTests/media/media-controls-accessibility.html	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/LayoutTests/media/media-controls-accessibility.html	2017-07-26 07:39:01 UTC (rev 219906)
@@ -37,10 +37,12 @@
         debug("muteButton.stringValue: " + muteButton.stringValue);
         debug("press muteButton");
         muteButton.press();
-        debug("muteButton.stringValue: " + muteButton.stringValue + "\n");
+        setTimeout(function() {
+            debug("muteButton.stringValue: " + muteButton.stringValue + "\n");
               
-        // Left/Right arrow key should have 0.5 second step on timeline. 
-        checkTimeLineValue(rightArrow);
+            // Left/Right arrow key should have 0.5 second step on timeline. 
+            checkTimeLineValue(rightArrow);
+        }, 10);
     }); 
     
     waitForEvent("seeked", function () {

Modified: trunk/Source/WebCore/ChangeLog (219905 => 219906)


--- trunk/Source/WebCore/ChangeLog	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/Source/WebCore/ChangeLog	2017-07-26 07:39:01 UTC (rev 219906)
@@ -1,3 +1,19 @@
+2017-07-26  Nan Wang  <n_w...@apple.com>
+
+        AX: should dispatch accessibilityPerformPressAction async on MacOS
+        https://bugs.webkit.org/show_bug.cgi?id=174849
+
+        Reviewed by Chris Fleizach.
+
+        If performing the accessibility press action results in a modal alert being displayed,
+        it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously.
+
+        Updated tests to adapt to this change.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
+        (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
+
 2017-07-25  Carlos Garcia Campos  <cgar...@igalia.com>
 
         Icon loader error on startup

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (219905 => 219906)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-07-26 06:19:47 UTC (rev 219905)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-07-26 07:39:01 UTC (rev 219906)
@@ -3415,6 +3415,15 @@
 
 - (void)accessibilityPerformPressAction
 {
+    // In case anything we do by performing the press action causes an alert or other modal
+    // behaviors, we need to return now, so that VoiceOver doesn't hang indefinitely.
+    dispatch_async(dispatch_get_main_queue(), ^ {
+        [self _accessibilityPerformPressAction];
+    });
+}
+
+- (void)_accessibilityPerformPressAction
+{
     if (![self updateObjectBackingStore])
         return;
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to