Bug 140485

Summary: AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, commit-queue, dmazzoni, jcraig, jdiggs, justin, mario, rniwa, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
andersca: review+, buildbot: commit-queue-
Archive of layout-test-results from ews105 for mac-mavericks-wk2 none

Description chris fleizach 2015-01-14 17:40:58 PST
If by focusing an object causes a JS alert to appear, VO will hang, because accessibilitySetValue: never gets a chance to return

To fix this we should perform the setValue operation after a delay so that we can return immediately to VoiceOver

<rdar://problem/19433451>
Comment 1 chris fleizach 2015-02-08 00:15:58 PST
Created attachment 246236 [details]
patch
Comment 2 Build Bot 2015-02-08 00:51:20 PST
Comment on attachment 246236 [details]
patch

Attachment 246236 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5645715678167040

New failing tests:
platform/mac/accessibility/setting-attributes-is-asynchronous.html
Comment 3 Build Bot 2015-02-08 00:51:25 PST
Created attachment 246238 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 4 Anders Carlsson 2015-02-08 07:02:30 PST
Comment on attachment 246236 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246236&action=review

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3253
> +    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
> +        [self _accessibilitySetValue:value forAttribute:attributeName];
> +    });

I think you can just use dispatch_async here instead of dispatch_after.
Comment 5 Anders Carlsson 2015-02-08 09:46:08 PST
Comment on attachment 246236 [details]
patch

r=me if you address the comment I had!.
Comment 6 chris fleizach 2015-02-08 22:45:58 PST
(In reply to comment #5)
> Comment on attachment 246236 [details]
> patch
> 
> r=me if you address the comment I had!.

Thanks! will do
Comment 7 chris fleizach 2015-02-08 23:11:32 PST
http://trac.webkit.org/changeset/179820