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 487230 - get{Speech,ShortBraille,LongBraille,Braille}ForRoleName should allow role to be overridden
get{Speech,ShortBraille,LongBraille,Braille}ForRoleName should allow role to ...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Eitan Isaacson
Orca Maintainers
Depends on:
Blocks: 448848
 
 
Reported: 2007-10-16 17:39 UTC by Willie Walker
Modified: 2007-10-30 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (18.07 KB, patch)
2007-10-17 22:42 UTC, Eitan Isaacson
committed Details | Review

Description Willie Walker 2007-10-16 17:39:32 UTC
There are spots in Orca where we temporarily override the role of an object to fool the generator into giving us a different rolename for an object.  The most notable examples of this include changing table cell roles into checkboxes.

A possible solution to this would be to add an extra parameter to the rolenames.py methods to specify rolename to use.  Another possible workaround might be to use the user_data field as a means to hold the overriding role value.  The rolenames.py methods could then check for the existence of that.  Another alternative is to do something even better, but which I'm not thinking of right now.  :-)
Comment 1 Eitan Isaacson 2007-10-16 21:25:40 UTC
We discussed this early on in the migration process, and we said that rolenames.py would be a good home for this kind of logic, do you still agree?
If you look at rolenames.py I think I already started doing that kind of work, and it should be merged to trunk.
Comment 2 Willie Walker 2007-10-16 21:42:35 UTC
I'd really like for scripts to be able to override decision-making logic like this if they could.  For example, if by change Gecko decided to implement something like checkboxes a little differently (e.g., expose a 'checkable' attribute or something like that), it would be nice if Gecko.py could provide the code to handle that rather than rolenames.py.
Comment 3 Eitan Isaacson 2007-10-17 22:42:40 UTC
Created attachment 97393 [details] [review]
Proposed fix

This adds the ability in a few key methods to override the accessible's provided role name.
Comment 4 Willie Walker 2007-10-18 14:24:07 UTC
Looks wonderful and you say it is a "perfect patch" and tested in IRC :-).  So, commit it to trunk.  Thanks!
Comment 5 Joanmarie Diggs (IRC: joanie) 2007-10-19 15:30:48 UTC
This patch seems to be causing icons on the desktop to be reported as checkboxes (as reported by Michael Whapples on the Orca list).

From my debug.out:

GENERATOR: _getSpeechForIcon
           obj             = debug.out
           role            = icon
           already_focused = False
           utterances:
               (debug.out)
               (plain text document)
               (check box)
SPEECH OUTPUT: ''
SPEECH OUTPUT: 'debug.out plain text document check box'
Comment 6 Willie Walker 2007-10-19 15:44:02 UTC
> GENERATOR: _getSpeechForIcon

Looks like there was a cut/paste typo in this speechgenerator.py method.  :-(  It refers to ROLE_CHECK_BOX.
Comment 7 Willie Walker 2007-10-30 15:22:39 UTC
Looks like the icon problem was fixed with Eitan's commit:

http://svn.gnome.org/viewvc/orca/trunk/src/orca/speechgenerator.py?view=diff&r1=3133&r2=3134

Can we close this bug?
Comment 8 Eitan Isaacson 2007-10-30 17:16:39 UTC
Hopefully his issue is fixed.