[webkit-dev] How does WebKit accessibility code tell VoiceOver that a page has finished loading?

Chris Fleizach cfleizach at apple.com
Thu Oct 1 17:58:04 PDT 2015


Frederic, have you forgotten about me so soon? 😿

Let’s move this to accessibility-dev at group.apple.com <mailto:accessibility-dev at group.apple.com>

Short answer is VoiceOver probably needs to white list firefox as a “web browser”. 

What is the bundle id being used?

We are checking if the app is org.mozilla.firefox or org.mozilla.nightly and treating that as a web-browser

Also you will need to post AXLoadComplete when the page is done loading

> On Oct 1, 2015, at 5:00 PM, Darin Adler <darin at apple.com> wrote:
> 
> 
>> On Oct 1, 2015, at 4:10 PM, Frédéric WANG <fred.wang at free.fr> wrote:
>> 
>> Hi,
>> 
>> When Safari has finished loading a page, VoiceOver plays an ascending
>> three tone sound effect, selects the web document and starts reading the
>> page. I'm trying to reproduce this effect on Firefox for Mac (see
>> https://bugzilla.mozilla.org/show_bug.cgi?id=718637).
>> 
>> There is an old message on Apple mailing list indicating that the
>> application listening the notification must actually play the sound.
>> However, that does not seem to reply to the question since Gecko is the
>> sender of the notification, not the receiver:
>> http://prod.lists.apple.com/archives/accessibility-dev/2012/Apr/msg00007.html
>> 
>> So instead I'm asking on this mailing list, since Gecko must probably
>> behave the same as WebKit. Reading WebKit source code, I found various
>> potential candidate notifications to send to VoiceOver:
>> 
>> @"AXLoadComplete"
>> @"AXLayoutComplete"
>> NSAccessibilityFocusedUIElementChangedNotification
>> 
>> I tried making Gecko call NSAccessibilityPostNotification with these
>> three events when the page is loaded and rendered but that does not seem
>> to help. The best I obtained is that the focus is now put on the web
>> document once it is loaded.
>> 
>> Any ideas about how WebKit accessibility code works here?
> 
> WebKit does not play a page loaded sound. WebKit does not post a notification that directly causes VoiceOver to play a page loaded sound. If WebKit did, then you’d presumably hear that sound whenever you open message in Mail; Mail uses WebKit to load the message content. Likely the same would happen in other applications that use WebKit.
> 
> I think the original answer from the Apple mailing list is possibly correct, although I don’t know who Travis Siegel is and the comment about the accessibility callback seems incorrect. It’s unlikely that listening for an accessibility notification sent by WebKit is involved in Safari’s implementation. It’s easy for an app using WebKit to know when the page is loaded, and no reason for it to make use of an accessibility notification to implement something like this.
> 
> Since this mailing list is about development of WebKit, I don’t think it’s likely you’ll find someone here who is an expert on exactly how the Safari app works with VoiceOver. It’s possible that some person meeting that description reads this list, but this list is supposed to be for discussing the development of WebKit, not general Apple technical support questions, even ones related to writing web browsers.
> 
> I suggest normal Apple developer support channels.
> 
> — Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20151002/a470cb41/attachment.html>


More information about the webkit-dev mailing list