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 519557 - gtk-demo/role_spin_button.py regression test #2 produces the wrong results.
gtk-demo/role_spin_button.py regression test #2 produces the wrong results.
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.21.x
Other Linux
: Normal normal
: ---
Assigned To: Rich Burridge
Orca Maintainers
: 519558 (view as bug list)
Depends on:
Blocks: 519271
 
 
Reported: 2008-02-29 16:03 UTC by Rich Burridge
Modified: 2008-03-03 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem. (3.18 KB, patch)
2008-02-29 21:43 UTC, Rich Burridge
none Details | Review
Revision #2 (3.25 KB, patch)
2008-03-03 18:15 UTC, Rich Burridge
committed Details | Review

Description Rich Burridge 2008-02-29 16:03:30 UTC
This is on latest Ubuntu Hardy:

EXPECTED:
     "BUG? - Text is selected, but selection not presented.",
     "BRAILLE LINE:  'gtk-demo Application Changing color ColorChooser ColorChooser Hue: 240 $l'",
     "     VISIBLE:  'Hue: 240 $l', cursor=9",
     "SPEECH OUTPUT: 'Hue:'",
     "SPEECH OUTPUT: 'spin button'",
     "SPEECH OUTPUT: '240'",
     "SPEECH OUTPUT: 'Alt h'",
ACTUAL:
     "BRAILLE LINE:  'gtk-demo Application Changing color ColorChooser ColorChooser Hue: 240 $l'",
     "     VISIBLE:  'Hue: 240 $l', cursor=9",
     "SPEECH OUTPUT: 'Hue:'",
     "SPEECH OUTPUT: 'spin button'",
     "SPEECH OUTPUT: '240'",
     "SPEECH OUTPUT: 'Alt h'",
[FAILURE WAS EXPECTED - LOOK FOR BUG? IN EXPECTED RESULTS]

We need to determine why the text isn't being presented as selected.

Possible duplicate of bug #519556.
Comment 1 Rich Burridge 2008-02-29 21:39:39 UTC
*** Bug 519558 has been marked as a duplicate of this bug. ***
Comment 2 Rich Burridge 2008-02-29 21:43:21 UTC
Created attachment 106300 [details] [review]
Patch to fix the problem.

I've put the "selected" utterance in the same place as for the two
"where am I" operations as it is for a normal "focus:" type utterance.
That's just before uttering the role. Hopefully that's okay.

Regression tests #2 and #3 have been updated to match the new output.

Please test.
Comment 3 Joanmarie Diggs (IRC: joanie) 2008-03-01 20:32:55 UTC
Color name:
  * Tab - SPEECH OUTPUT: 'Color name: text #0000FF selected'
  * whereAmI - SPEECH OUTPUT: 'Color name:'
               SPEECH OUTPUT: 'text'
               SPEECH OUTPUT: '#0000FF'
               SPEECH OUTPUT: 'selected'
               SPEECH OUTPUT: 'Alt n'

Hue:
  * Tab - SPEECH OUTPUT: 'Hue: 240 selected spin button'
  * whereAmI - SPEECH OUTPUT: 'Hue:'
               SPEECH OUTPUT: 'selected'
               SPEECH OUTPUT: 'spin button'
               SPEECH OUTPUT: '240'
               SPEECH OUTPUT: 'Alt h'

My personal preference would be to move 'selected' so that it is after the string that is selected (i.e. '240' is selected; 'Hue' is not).  That would also make whereAmI for spin buttons consistent with the focus event behavior for spin buttons, as well as make the whereAmI behavior w.r.t. text selection consistent between text and spin buttons.
Comment 4 Rich Burridge 2008-03-01 21:01:03 UTC
Okay. Sounds like we need TheWord(tm) (um, I mean a spec.) from Mike.

Thanks.
Comment 5 Rich Burridge 2008-03-02 01:06:49 UTC
Just to note that currently the speech for a "focus:" event
for a spin button is in a slightly different order than the
"where am I" speech for the same object.

_getSpeechForSpinButton() in speechgenerator.py calls _getDefaultSpeech().
That method calls:

1/ _getSpeechForObjectLabel
2/ getSpeechForObjectName
3/ _getSpeechForAllTextSelection        <== this one possibly adds "selected".
4/ _getSpeechForObjectRole
5/ _getSpeechForObjectAvailability

In the _speakSpinButton() method in where_am_I.py there currently is:

1/ _getObjLabel
2/ getSpeechForRoleName
3/ _getObjName
4/ _getObjAccelerator

For partial consistency, I therefore added the code that's the equivalent to
_getSpeechForAllTextSelection between 1 and 2.

If you want the where_am_i code to be completely consistent with
the _getSpeechForSpinButton() in speechgenerator.py, then 3/ should
probably be moved between 1/ and 2/ as well.

Mike, this is what we need your decision on.

Thanks.

Comment 6 Mike Pedersen 2008-03-03 04:10:50 UTC
The most important thing here is that the state in focus tracking should always be presented after the text.  IE "240" selected. 
For whereamI it is OK to present the role before the value.  
Comment 7 Rich Burridge 2008-03-03 18:15:46 UTC
Created attachment 106499 [details] [review]
Revision #2

Thanks Mike.
Comment 8 Joanmarie Diggs (IRC: joanie) 2008-03-03 18:37:31 UTC
Works beautifully for me.  Thanks Rich.
Comment 9 Rich Burridge 2008-03-03 18:53:43 UTC
Thanks Joanie. Patch committed to SVN trunk. Closing as FIXED.