GNOME Bugzilla – Bug 408071
[blocked] Flat review of Firefox reveals content from all tabs
Last modified: 2007-04-13 18:48:54 UTC
This is a blocking bug for https://bugzilla.mozilla.org/show_bug.cgi?id=370455. The effect of this bug is that all tabs and all their content appear as SHOWING to Orca, so Orca happily flat reviews strings that aren't really showing on the display.
Created attachment 83180 [details] [review] Patch to try to work around useless objects and broken Gecko hiearchies
Sorry...I was bugzilla'd into clicking on the wrong URL. Ignore the previous patch/comment.
As a possible workaround to this problem, we could do the following: modify flat_review.py:getShowingZones to determine if the current object is a document frame. If it is, see if this is the document frame that's currently in view. This can be determined using the getDocumentFrame logic in Gecko.py. If the document frame found by this logic matches the current document frame in question, then it is showing. If it isn't, then it is not. # [[[TODO: WDW - this is based upon the 12-Oct-2006 implementation # that uses the EMBEDS relation on the top level frame as a means # to find the document frame. Future implementations will break # this.]]] # documentFrame = None for i in range(0, self.app.childCount): child = self.app.child(i) if child.role == rolenames.ROLE_FRAME: relations = child.relations for relation in relations: if relation.getRelationType() \ == atspi.Accessibility.RELATION_EMBEDS: documentFrame = atspi.Accessible.makeAccessible( \ relation.getTarget(0)) if documentFrame.state.count( \ atspi.Accessibility.STATE_SHOWING): break else: documentFrame = None return documentFrame Another refactoring opportunity here might be to add some sort of "pursue child for flat review" method in the script. Instead of looking at just the "SHOWING" state in flat_review.py:getShowingZones, getShowingZones could call this new "pursue child for flat review" method. The default.py implementation would just look at the SHOWING state. The Gecko.py implementation would look at the return value of default.py and then couple it with the document frame check above. Finally, there may be some opportunity to look at the Z-ordering of the component, but I have my fears about that.
Created attachment 83901 [details] [review] Patch to do the refactor and skip document frames that firefox is not showing. This patch implements the refactoring idea from the previous comment. It seems to eliminate the problem of picking up text from tabs that are not showing. The only reason this is hot for me right now is that it helps give the user an alternative escape mechanism to navigate pages where the caret/structural navigation is broken.
I'm closing this one as FIXED since we worked around the FF bug.