GNOME Bugzilla – Bug 630591
Orca's _generateDisplayedText should return an empty list when there is no text.
Last modified: 2010-11-29 13:29:40 UTC
Created attachment 171105 [details] Debug file from eclipse session When in eclipse if you tab through the toolbar all that shows in braille is the word "button". With speech you get the proper button label. To duplicate: Open eclipse (3.6 or 3.7 though I recall this problem with other versions) Highlight an item such as the project tree. Tab through the options until you return to the tree. As you go through the toolbar the braille display will show button several time while speech will tell you what those buttons actually are.
The problem turns out not to be an Eclipse issue, but a quirk involving Orca's formatting strings. The change is simple enough, but it has the potential to impact all of Orca. Therefore, it will require thorough regression testing. I'll take this one.
Created attachment 173134 [details] [review] proposed fix For those curious, here's the fix. Basically, what is happening is the formatting strings, crazy beasts that they are, include this for generating braille for push buttons: asString(((label + displayedText) or description) + roleName) meaning "go with the label plus the displayed text, and if that's None, go with the description instead." Well, in the reported bug, the label is None and there is no displayedText. But the fact that displayedText is a list containing an empty string is causing it to fail the 'None' test. Thus we are never bothering to get the description, which is where our wayward text/functional label happens to live. The solution is to return an empty list instead. The potential problem/what requires regression testing is that *everything* at some point looks to _generateDisplayedText(). Everything *should* deal with the empty list gracefully, but I would not bet on it. Plus we might see unexpected differences in behavior as a result in this change. I'll start the regression tests now.
I'm running with this patch applied a week ago. So far no problem.
Comment on attachment 173134 [details] [review] proposed fix http://git.gnome.org/browse/orca/commit/?id=4d997deb1a50aa3753f9c474122fb5798ee1ca01