After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 462509 - ARIA dialogs are not being announced
ARIA dialogs are not being announced
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: 2.22.0
Assigned To: Scott Haeger
Orca Maintainers
Depends on:
Blocks: 423348
 
 
Reported: 2007-08-01 15:45 UTC by Scott Haeger
Modified: 2008-07-22 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first version of ARIA dialogs are not being announced (1.44 KB, patch)
2007-08-02 14:04 UTC, Scott Haeger
none Details | Review
second version of ARIA dialogs are not being announced (1.44 KB, patch)
2007-08-08 16:33 UTC, Scott Haeger
accepted-commit_now Details | Review

Description Scott Haeger 2007-08-01 15:45:58 UTC
ARIA dialogs are not true windows so onWindowActivated() is not triggered when one of these dialogs appears.  There are caretMoved and Focus events being triggered, but unfortunately neither of these event handlers are handling these dialogs properly.  I would have expected locusOfFocusChanged() to handle this situation, but updateBraille() is failing for some reason.  braille.setFocus() seems to get hung in getLineInfo().  Investigate and implement a new strategy for ARIA dialogs.
Comment 1 Scott Haeger 2007-08-02 14:04:02 UTC
Created attachment 92922 [details] [review]
first version of ARIA dialogs are not being announced

ARIA dialogs are a departure from  "treat ARIA widgets like GTK+ widgets" paradigm because ARIA dialogs are not top level windows.  As such, the work was done in gecko.py instead of default.py.

Two changes were necessary.  First, in locusOfFocusChanged I detected if the newly focused obj is a dialog.  If it is I set the caret and created both speech and Braille output.  I am not sure if this is the best approach but it does seem to work quite well on my dialog test case http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Dialog.html .  Next, I may have exposed a Mozilla bug because the dialog has a 'text' object that does not implement IText.  Strange!  The check for a valid IText handle in braille.py was necessary to get around this.
Comment 2 Willie Walker 2007-08-08 15:45:20 UTC
> Two changes were necessary.  First, in locusOfFocusChanged I detected if the
> newly focused obj is a dialog.  If it is I set the caret and created both
> speech and Braille output.  

With the patch, the logic will continue on in the method if the role is a dialog.  Is this the intent?  If not, would it be better to just add the dialog role check in to the 'if'?

                if (oldLocusOfFocus and \
                   not self.inDocumentContent(oldLocusOfFocus)) \
                    or (newLocusOfFocus \
                        and (newLocusOfFocus.role == rolenames.ROLE_DIALOG):

> .  Next, I may have exposed a Mozilla bug because the dialog has a 'text'
> object that does not implement IText.  Strange!  The check for a valid IText
> handle in braille.py was necessary to get around this.

This definitely seems like a Mozilla bug and what you've done seems like a good defensive maneuver.  Which specific object(s) in http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Dialog.html are showing this behavior, btw?
Comment 3 Scott Haeger 2007-08-08 16:30:51 UTC
(In reply to comment #2)
> > Two changes were necessary.  First, in locusOfFocusChanged I detected if the
> > newly focused obj is a dialog.  If it is I set the caret and created both
> > speech and Braille output.  
> 
> With the patch, the logic will continue on in the method if the role is a
> dialog.  Is this the intent?  If not, would it be better to just add the dialog
> role check in to the 'if'?

Yes, my thinking was that the default script should be called (end of method) and it probably should not be.  I've combined with the 'if' as suggested and it works fine.  I'll post new patch soon.


> > .  Next, I may have exposed a Mozilla bug because the dialog has a 'text'
> > object that does not implement IText.  Strange!  The check for a valid IText
> > handle in braille.py was necessary to get around this.
> 
> This definitely seems like a Mozilla bug and what you've done seems like a good
> defensive maneuver.  Which specific object(s) in
> http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Dialog.html
> are showing this behavior, btw?

The behavior was seen for the text object that is the child of the dialog launched from 'Show dialog'.  Something has changed in Firefox and this problem is no longer being seen.  BTW, the dialog is buried deep in the hierarchy.  It is in the third to last section that has children.  I believe the defensive code should stay.  It is very cheap and who knows how many similar errors are out there,



Comment 4 Scott Haeger 2007-08-08 16:33:47 UTC
Created attachment 93292 [details] [review]
second version of ARIA dialogs are not being announced

patch includes recommendations from Will's previous comment.
Comment 5 Willie Walker 2007-08-08 16:39:13 UTC
> Created an attachment (id=93292) [edit]
> second version of ARIA dialogs are not being announced

Looks good to me.  I say check it in to trunk, mark this as [pending] and let people give it a test drive.  If Joanie and Mike come back and say it works for them, this probably should also be checked into the gnome-2-20 branch.  Thanks!
Comment 6 Scott Haeger 2007-08-08 17:17:28 UTC
Committed to trunk.
Comment 7 Joanmarie Diggs (IRC: joanie) 2007-08-08 18:00:29 UTC
Works for me.
Comment 8 Mike Pedersen 2007-08-15 18:04:16 UTC
This seems to work well with the supplied test case.
Comment 9 Scott Haeger 2007-08-17 19:02:22 UTC
This has been retested and continues to work.  I'm marking it FIXED.