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 364774 - Orca should report the quantity of items in a group of radio buttons
Orca should report the quantity of items in a group of radio buttons
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.17.x
Other All
: Normal enhancement
: ---
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-24 18:28 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2006-12-15 16:05 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to implement the feature. (1.35 KB, patch)
2006-10-29 17:07 UTC, Rich Burridge
none Details | Review
Revised version of the patch to cater for OOo radio buttons. (1.65 KB, patch)
2006-10-30 15:40 UTC, Rich Burridge
none Details | Review

Description Joanmarie Diggs (IRC: joanie) 2006-10-24 18:28:23 UTC
Orca now reports the number of items in a menu/submenu and a list when you use whereAmI.  This functionality would be beneficial in a group of radio buttons as well.
Comment 1 Rich Burridge 2006-10-27 18:20:37 UTC
This might be an enhancement that we have to close as "WONTFIX"
as I don't believe there is an easy way to determine the radio
button group from a accessible radio button object.
Comment 2 Willie Walker 2006-10-28 15:18:02 UTC
Radio buttons should provide a RELATION_MEMBER_OF relation.  If I remember correctly (there's some code in default.py around line 1431 that uses this relation), the way this is used is that all radio buttons in the same group list themselves and all other radio buttons in the group in their relations.  That is, a radio button has multiple RELATION_MEMBER_OF relations that represent every object in the radio button group.  As a result, getting the count should be somewhat trivial.

BTW, as a related enhancement - maybe all members of a radio button group should automatically be listed on the braille display?  If users agree, we should open a new RFE.
Comment 3 Rich Burridge 2006-10-28 16:11:24 UTC
Hmmm. Interesting. Then if this relationship exists, then surely it wouldn't
have been too hard to implement bug #348975 - "orca should not speak the role 
when moving between radio buttons". Should this be reopened and investigated further?
Comment 4 Rich Burridge 2006-10-29 17:07:31 UTC
Created attachment 75623 [details] [review]
Patch to implement the feature.

Here's a patch that sort of does the right thing. As far as I can tell
though, the order of each of the members in the radio button group when
returned as targets in the realtionship, bears no resemblance to their visual
order on the screen. So you can uniquely report "Item x of y" for each one, 
but it doesn't match up visually to the current position within the radio group.
For a blind person, this is probably not a big deal.

Patch *NOT* checked into CVS HEAD as "where am I" is currently being reworked.
Comment 5 Joanmarie Diggs (IRC: joanie) 2006-10-29 17:40:51 UTC
Hi Rich.  I just tried the patch.

What I am observing so far is that the item position seems to be consistently/reliably the reverse of the visual order.  In other words given a group of radio buttons you get:

Visual:Reported

Item 1 of 4: Item 4 of 4
Item 2 of 4: Item 3 of 4
Item 3 of 4: Item 2 of 4
Item 4 of 4: Item 1 of 4

Item 1 of 2: Item 2 of 2
Item 2 of 2: Item 1 of 2

etc., etc.

So far I've tried this in the Orca preferences dialog, the Ubuntu Network Proxy dialog, the Ubuntu Sound Preferences dialog (System Beep page),  and the gedit Print dialog (Job page).  

If the relationship really is this predictable and is always the opposite of what is visually on the screen, you could just flip 'em.  Of course, who knows if you can count on that....
Comment 6 Rich Burridge 2006-10-29 18:22:41 UTC
I'm not seeing such consistency with GNOME 2.14 on Solaris
though. I tried it with Orca Preferences and gnome-terminal 
Edit->Current Profile (Effects pane).

I'll try it with Ubuntu Edgy (probably tomorrow) and see if
its any different there. Hey, maybe somebody has added
consistency to at-spi for this in GNOME 2.16...
Comment 7 Joanmarie Diggs (IRC: joanie) 2006-10-29 18:24:07 UTC
Good news and bad news.

Good news:  Add the Evolution Preferences dialog to the collection of examples where the visual position is predictably the reverse of the reported position. 

Bad news:  The patch has a problem in OOo Writer's Options dialog. 

Steps to reproduce:
1.  Launch Orca
2.  Launch OOo Writer 2.0.4
3.  Tools menu... Options
4.  Down arrow to Print
5.  Tab twice to move focus to the Printer radio button
6.  Press KP_Enter

Traceback (most recent call last):
  • File "/usr/lib/python2.4/site-packages/orca/input_event.py", line 178 in processInputEvent
    consumed = self._function(script, inputEvent)
  • File "/usr/lib/python2.4/site-packages/orca/default.py", line 1237 in whereAmI
    text = _("Item %d of %d") % (item, total)
UnboundLocalError: local variable 'item' referenced before assignment


Comment 8 Rich Burridge 2006-10-29 19:40:42 UTC
The bad news is yet another Open Office bug. That's saying that
there is no entry for the current radio button in the set of
radio buttons that it's a member of. Easy to program around, but
it's still their bug (or perhaps a poor interpretation of a dubious
spec). I'll adjust the patch to fix this (probably tomorrow).

Did you try it on Ubuntu with the gnome-terminal Edit->Current Profile
(Effects pane)?
Comment 9 Joanmarie Diggs (IRC: joanie) 2006-10-29 19:51:42 UTC
I hadn't tried it, but I did just now.  Drat!  You're right: It looks like you cannot always count on the order being the reverse. :-(

None (Item 1 of 3) is reported as 2 of 3.
Background image (item 2 of 3) is reported as 3 of 3.
Transparent background (item 3 of 3) is reported as 1 of 3.

I wonder if there's something dialog box creators can (should) be doing in order for us to reliably get the correct information....
Comment 10 Rich Burridge 2006-10-30 15:33:45 UTC
It looks like OOo doesn't have MEMBER_OF as a relation for radio buttons
*at all*. I've files a bug against them for it. See issue #71010.
http://www.openoffice.org/issues/show_bug.cgi?id=71010
Comment 11 Rich Burridge 2006-10-30 15:40:20 UTC
Created attachment 75667 [details] [review]
Revised version of the patch to cater for OOo radio buttons.
Comment 12 Willie Walker 2006-10-30 15:42:30 UTC
(In reply to comment #3)
> Hmmm. Interesting. Then if this relationship exists, then surely it wouldn't
> have been too hard to implement bug #348975 - "orca should not speak the role 
> when moving between radio buttons". Should this be reopened and investigated
> further?

The problem is having the speech generator get to the old locus of focus to determine whether or not to speak the role.  Is there a facility to allow the speech generator to do this?
Comment 13 Rich Burridge 2006-10-30 15:58:44 UTC
For the record, Will and I just discussed this on the phone.
A possible solution might be to store the old locus of focus 
in orca_state.py.

For now, we'll leave things as they are though, unless users 
complain.
Comment 14 Joanmarie Diggs (IRC: joanie) 2006-10-30 16:02:55 UTC
On a different note, the new patch works nicely. :-)  Thanks Rich!
Comment 15 Rich Burridge 2006-12-15 16:05:00 UTC
I notice that this functionality is nicely in the new where-ami-I
option. Closing as FIXED.