GNOME Bugzilla – Bug 519557
gtk-demo/role_spin_button.py regression test #2 produces the wrong results.
Last modified: 2008-03-03 18:53:43 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.
*** Bug 519558 has been marked as a duplicate of this bug. ***
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.
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.
Okay. Sounds like we need TheWord(tm) (um, I mean a spec.) from Mike. Thanks.
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.
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.
Created attachment 106499 [details] [review] Revision #2 Thanks Mike.
Works beautifully for me. Thanks Rich.
Thanks Joanie. Patch committed to SVN trunk. Closing as FIXED.