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 473420 - Orca speaking an extra "seconds" for the Preferences dialog.
Orca speaking an extra "seconds" for the Preferences dialog.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.19.x
Other Linux
: Normal normal
: 2.20.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-04 02:42 UTC by Rich Burridge
Modified: 2007-09-07 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Orca debug output showing where problem is. (7.09 KB, text/plain)
2007-09-04 15:34 UTC, Rich Burridge
  Details
Patch to SVN trunk to fix the problem. (10.63 KB, patch)
2007-09-04 18:34 UTC, Rich Burridge
none Details | Review
Hand edited patch for gnome-2-20 branch. (5.31 KB, patch)
2007-09-04 21:35 UTC, Rich Burridge
committed Details | Review
Revised hand edited patch for SVN trunk. (4.37 KB, patch)
2007-09-04 21:36 UTC, Rich Burridge
committed Details | Review

Description Rich Burridge 2007-09-04 02:42:32 UTC
1. Startup Orca
2. Startup pidgin.
3. Give focus to the pidgin application and press Insert-Control-Space to
   bring up the Orca application specific preferences.

After the Orce Preferences dialog appears, Orca speaks:

"Orca Preferences for pidgin seconds". 

It would appear the logic for handling "unattached" labels for a dialog
has changed recently and it's now speaking the "seconds" label to the 
right of the Update Interval combo box on the speech pane.
Comment 1 Willie Walker 2007-09-04 13:09:05 UTC
> After the Orce Preferences dialog appears, Orca speaks:
> 
> "Orca Preferences for pidgin seconds". 
> 
> It would appear the logic for handling "unattached" labels for a dialog
> has changed recently and it's now speaking the "seconds" label to the 
> right of the Update Interval combo box on the speech pane.

I'm not sure what might have changed in this space.  :-(  Is it possible that we just didn't notice this behavior until now?  Can you do some more debugging to see why this is happening?  Putting a debug.printStack(debug.LEVEL_OFF) in default.py:findUnrelatedLabels might be the spot, and I suspect it would be speechgenerator.py:_getSpeechForAlert that would be the thing doing this.

Comment 2 Joanmarie Diggs (IRC: joanie) 2007-09-04 13:25:22 UTC
> I'm not sure what might have changed in this space.  :-(  Is it possible that
> we just didn't notice this behavior until now?  

That would be my guess.  On my Solaris box I have the currently shipping version of Orca.  That was pre-progress bar updates and "seconds" is (obviously) not announced.  But if I give focus to the Magnifier pane, get out of the Orca Preferences dialog, and then return to the Orca Preferences dialog, Orca tacks on "pixels pixels".
Comment 3 Rich Burridge 2007-09-04 15:34:40 UTC
Created attachment 94939 [details]
Orca debug output showing where problem is.

> Putting a debug.printStack(debug.LEVEL_OFF) in
> default.py:findUnrelatedLabels might be the spot, 
> and I suspect it would be speechgenerator.py:_getSpeechForAlert 
> that would be the thing doing this.

Confirmed. 

What approach should be taken to fix this Will?
Comment 4 Willie Walker 2007-09-04 15:45:48 UTC
> > Putting a debug.printStack(debug.LEVEL_OFF) in
> > default.py:findUnrelatedLabels might be the spot, 
> > and I suspect it would be speechgenerator.py:_getSpeechForAlert 
> > that would be the thing doing this.
> 
> Confirmed. 

Thanks!

> What approach should be taken to fix this Will? 

I think that label for/by relations should be set up for the offending labels in the Orca Preferences GUI.
Comment 5 Rich Burridge 2007-09-04 16:33:49 UTC
> I think that label for/by relations should be set up for the offending labels
> in the Orca Preferences GUI.

So how would this work? On the speech pane we currently have:

Label              spin button  Label
--------------------------------------

Update Interval: (( setting )) seconds

The spin button button (I thought) could only be LABELLED_BY
one label. Did I get this wrong? Can you give it two LABELLED_BY
relationships? If so, which one will it speak first?
Comment 6 Willie Walker 2007-09-04 17:06:36 UTC
> The spin button button (I thought) could only be LABELLED_BY
> one label. Did I get this wrong? Can you give it two LABELLED_BY
> relationships? 

I'm pretty sure an object can be labelled by more than one thing, and default.py:findDisplayedLabel handles this (though the name "findDisplayedLabel" is a bit misleading).  

> If so, which one will it speak first?

The order in which the list of labels is presented is dependent upon the order in which they are found via the AT-SPI relations value.  We could potentially make the order dependent upon their 2D location on the display, but that would be a separate RFE.
Comment 7 Rich Burridge 2007-09-04 18:34:27 UTC
Created attachment 94947 [details] [review]
Patch to SVN trunk to fix the problem.

Not committed yet.

I don't see any way in Glade to allow you to setup two LABELLED_BY
relationships for a component. So what I did was setup a single
LABELLED_BY relation for the spin buttons (to the label to the left
of the spin button), and two LABEL_FOR relationships to the spin
button (from the labels on each side of the spin button).

This seems to nicely fix the problem although it doesn't speak the
right hand label when you have focus on the spin button in question.
Personally I think that's a good thing, but if we want that second
("units") label spoken, then I'm going to need to dig deeper.

Please test. If we are happy with this, then I'll work out an equivalent
patch for the gnome-2-20 branch.
Comment 8 Joanmarie Diggs (IRC: joanie) 2007-09-04 19:26:10 UTC
This works for me.  

I didn't see a way to set up two LABELLED_BY's in the Glade interface designer, but it seems that you can tack them on manually.  But then what is spoken is:

First/real label
units
spin button

That's no good -- and seems like it might take some doing to cause us to get:

First/real label
spin button
units

Therefore, my vote is for the current patch as it stands.
 
Comment 9 Rich Burridge 2007-09-04 21:07:27 UTC
We talked about this bug in the Orca team meeting today.
The plan is as follows:

1/ For GNOME 2.20, hand edit the opca-setup.glade file and
   just add in the new <atkrelation> clauses that are the
   equivalent of those found in the attachment in comment #7
   (without the other bits that Glade seems to have touched).
   Patch to follow.

2/ For post-GNOME-2.20, open up a new RFE that will nicely
   allow up to speak/braille both labels for each of these
   spin buttons (multiple LABELLED_BY and LABEL_FOR relationships).
   Bug number to follow.
Comment 10 Rich Burridge 2007-09-04 21:15:29 UTC
New RFE for the problem in 2/ in comment #9 is bug #473699.
Comment 11 Rich Burridge 2007-09-04 21:35:53 UTC
Created attachment 94957 [details] [review]
Hand edited patch for gnome-2-20 branch.
Comment 12 Rich Burridge 2007-09-04 21:36:22 UTC
Created attachment 94958 [details] [review]
Revised hand edited patch for SVN trunk.
Comment 13 Rich Burridge 2007-09-04 21:38:29 UTC
I'ver attached two revised patches (one for gnome-2-20 branch
and the other for trunk). I didn't like the other changes that Glade
was making so I've removed them.

I've also committed both these patches and moved the bug to a "[pending]"
state. Please test and let me know if you find any problems.

As noted above, further work on this (for post GNOME 2.20) will
be done in bug #473699.
Comment 14 Mike Pedersen 2007-09-07 15:28:44 UTC
This seems to be working as expected.