Bug 1699053 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to James Teh [:Jamie] from comment #12)
> (In reply to Morgan Reschenberg [:morgan] from comment #11)
> > We are correctly sending AXLiveRegionChanged notifications both times when the popup is populated. It seems VoiceOver ignores those without a proceeding creation event, however. 
> 
> The thing I don't follow is: there is a creation event the first time the popup appears. If we're not firing a hide event, then we should never be telling Mac the live region got destroyed. So shouldn't VO still think the live region is created? And if not, why does it think the live region died if we didn't tell it so?

I don't know why it doesn't maintain the live region as "active" in whatever internal accounting it does. Technically we don't do any special bookkeeping around "live region destroyed", we rely on the event that gets sent when an element expires, and we just expect VO to interpret that as "this element is gone, if it was a live region that live region is gone too". We currently (correctly) aren't firing that destroyed event, so VO in theory should never be notified of the destruction. My guess is there's something about a page refresh (ie. getting AXLoadComplete, AXLayoutComplete) that cause VO to invalidate its state. From looking at the Webkit code and tooling Safari's events, it looks like this is consistent with how they handle live regions (ie. there's no special event for "destroy" and they only fire a creation event once per live region, unless the region is destroyed and then re-added to the tree. all subsequent changes get "AXLiveRegionChanged" events).
(In reply to James Teh [:Jamie] from comment #12)
> (In reply to Morgan Reschenberg [:morgan] from comment #11)
> > We are correctly sending AXLiveRegionChanged notifications both times when the popup is populated. It seems VoiceOver ignores those without a proceeding creation event, however. 
> 
> The thing I don't follow is: there is a creation event the first time the popup appears. If we're not firing a hide event, then we should never be telling Mac the live region got destroyed. So shouldn't VO still think the live region is created? And if not, why does it think the live region died if we didn't tell it so?

I don't know why it doesn't maintain the live region as "active" in whatever internal accounting it does. Technically we don't do any special bookkeeping around "live region destroyed", we rely on the event that gets sent when an element expires, and we just expect VO to interpret that as "this element is gone, if it was a live region that live region is gone too". We currently (correctly) aren't firing that destroyed event, so VO in theory should never be notified of the destruction. My guess is there's something about a page refresh (ie. getting AXLoadComplete, AXLayoutComplete) that cause VO to invalidate its state. From looking at the Webkit code and tooling Safari's events, it looks like our event handling is consistent with how they handle live regions (ie. there's no special event for "destroy" and they only fire a creation event once per live region, unless the region is destroyed and then re-added to the tree. all subsequent changes get "AXLiveRegionChanged" events).

Back to Bug 1699053 Comment 13