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 468551 - Support ARIA checkboxTriState
Support ARIA checkboxTriState
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: 2.22.0
Assigned To: Scott Haeger
Orca Maintainers
Depends on:
Blocks: 423348
 
 
Reported: 2007-08-20 15:03 UTC by Scott Haeger
Modified: 2008-07-22 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first version of support for ARIA checkboxTriState (799 bytes, patch)
2007-08-20 15:23 UTC, Scott Haeger
none Details | Review
second version of Support ARIA checkboxTriState (2.11 KB, patch)
2007-08-22 15:41 UTC, Scott Haeger
none Details | Review
third version of Support ARIA checkboxTriState (3.86 KB, patch)
2007-08-22 20:36 UTC, Scott Haeger
reviewed Details | Review
test case (2.62 KB, application/x-compressed-tar)
2007-09-28 17:50 UTC, Scott Haeger
  Details
post pyatspi version (4.18 KB, patch)
2007-11-27 18:40 UTC, Scott Haeger
needs-work Details | Review
2nd version post pyatspi migration (7.00 KB, patch)
2007-11-27 20:20 UTC, Scott Haeger
accepted-commit_now Details | Review

Description Scott Haeger 2007-08-20 15:03:53 UTC
ARIA defines a tristate checkbox where the third state is an indeterminate state.  Add output for this state.

Test case: two tests linked from http://www.disability.uiuc.edu/ita/brasic/citaweb/test/aria/checkboxTriState/checkboxTri1.php
Comment 1 Scott Haeger 2007-08-20 15:23:53 UTC
Created attachment 93991 [details] [review]
first version of support for ARIA checkboxTriState

Mike,

Very simple addition.  Can you please see if it performs as expected.
Comment 2 Scott Haeger 2007-08-22 15:41:12 UTC
Created attachment 94127 [details] [review]
second version of Support ARIA checkboxTriState

This patch also addresses the Braille indicator.  I also changed the speech output for the third state to 'partially checked'.  Is this correct?  My memory has already faded since the team meeting just yesterday :(
Comment 3 Willie Walker 2007-08-22 18:53:49 UTC
(In reply to comment #2)
> Created an attachment (id=94127) [edit]
> second version of Support ARIA checkboxTriState
> 
> This patch also addresses the Braille indicator.  I also changed the speech
> output for the third state to 'partially checked'.  Is this correct?  My memory
> has already faded since the team meeting just yesterday :(
> 

This is looking good.  Can you also make patches to flat_review.py:StateZone zone to add the appropriate checks for the indeterminate state as well?  

In addition, do you think it is possible that check menu items might end up with the indeterminate state?  If so, I think they may need some work as well.

Thanks!
Comment 4 Scott Haeger 2007-08-22 20:33:44 UTC
> 
> This is looking good.  Can you also make patches to flat_review.py:StateZone
> zone to add the appropriate checks for the indeterminate state as well?  
> 
Done

> In addition, do you think it is possible that check menu items might end up
> with the indeterminate state?  If so, I think they may need some work as well.
> 

I went ahead and added the indeterminate state for check menu items as well.  However, speech for these objects has no state information output so no change was made there.  I only changed the Braille output and included these objects in the same test used for checkboxes within flat_review:StateZone.

Two additional problems were identified.

1) Firefox is creating new objects during a state change event.  This causes isAriaWidget() to fail in _getSpeechForCheckbox() resulting in gecko._getSpeechForCheckbox() to be executed with a <defunct> object.  This causes inaccurate output during a state change event.  I really don't know how to resolve this.

2)  The ARIA checkboxTriState objects are not triggering object:state-changed:checked events.  This results in no output when the checkboxTriStates are checked.  A Mozilla bug was file here https://bugzilla.mozilla.org/show_bug.cgi?id=393279
Comment 5 Scott Haeger 2007-08-22 20:36:18 UTC
Created attachment 94147 [details] [review]
third version of Support ARIA checkboxTriState

patch referenced in above comment
Comment 6 Willie Walker 2007-08-24 15:33:55 UTC
> I went ahead and added the indeterminate state for check menu items as well. 
> However, speech for these objects has no state information output so no change
> was made there. 

I see - the check menu item stuff for speech just delegates to the check box code.  
 
> 1) Firefox is creating new objects during a state change event.  This causes
> isAriaWidget() to fail in _getSpeechForCheckbox() resulting in
> gecko._getSpeechForCheckbox() to be executed with a <defunct> object.  This
> causes inaccurate output during a state change event.  I really don't know how
> to resolve this.

UGH!  Why the heck is it creating new objects?  Very very strange, and this seems like a Gecko bug.  :-(
Comment 7 Scott Haeger 2007-09-05 15:06:03 UTC
According to Aaron, the PFWG has decided to remove checkboxtristate see https://bugzilla.mozilla.org/show_bug.cgi?id=393279#c8 .  This bug fix should be put on hold until they make a decision on what they will do with this widget type.
Comment 8 Scott Haeger 2007-09-28 17:50:19 UTC
Created attachment 96336 [details]
test case

The Mozilla bug is now resolved.  This patch is correct but we might want to wait until this Mozilla bug is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=395900.  Otherwise, a new accessible is created when a user selects a checkbox.  This in turn causes Orca not to output state changes.
Comment 9 Willie Walker 2007-11-27 17:35:17 UTC
This seems like a patch that needs doing regardless of whether Gecko is broken or not (i.e., it will support other toolkits that support INDETERMINATE checkboxes).  Can you work up a pyatspi version?
Comment 10 Scott Haeger 2007-11-27 18:40:43 UTC
Created attachment 99733 [details] [review]
post pyatspi version

post pyatspi migration version
Comment 11 Willie Walker 2007-11-27 19:21:16 UTC
This is looking good.  I think addressing this bug, however, probably needs to be more global than just ARIA checkbox tristate.  I just ran the following command to get an idea of what extra work might need doing:

bash-3.2$ find src/ -name \*.py | xargs egrep "Indicators|not checked" | cut -f1 -d: | sort -u
src/orca/Gecko.py
src/orca/braillegenerator.py
src/orca/flat_review.py
src/orca/orca_gui_prefs.py
src/orca/scripts/Evolution.py
src/orca/scripts/planner.py
src/orca/settings.py
src/orca/speechgenerator.py
src/orca/where_am_I.py

In particular, the following areas may need more work in the areas where they speak and/or braille checkbox or check menu item state:

src/orca/Gecko.py:
   _getBrailleRegionsForCheckBox
   _getSpeechForCheckBox

src/orca/where_am_I.py
   _speakCheckBox
   _speakMenuItem

Not much extra stuff to do.  :-)  Another thing that seems apparent, though, is that there might be a refactoring opportunity to get the braille indicator and the speech for the state -- the code is no longer super trivial.  But...that's not super high priority.  I'll leave it to you to decide what to do.
Comment 12 Scott Haeger 2007-11-27 20:20:13 UTC
Created attachment 99737 [details] [review]
2nd version post pyatspi migration

Additional changes to Gecko braille/speech handlers and where_am_I.py as outlined in Will's previous comment.
Comment 13 Willie Walker 2007-11-27 20:29:35 UTC
Looks great to me.  As long as you've tested this and are sure it doesn't introduce regressions, I'm good with it.  Thanks!
Comment 14 Scott Haeger 2007-11-29 19:10:51 UTC
Tested everything except a GTK+ checkboxtristate.  Is there an example that you know of?

Committed to repository.
Comment 15 Willie Walker 2007-11-29 19:21:44 UTC
(In reply to comment #14)
> Tested everything except a GTK+ checkboxtristate.  Is there an example that you
> know of?
> 
> Committed to repository.
> 

I don't know of an example, but GTK+ seems to support it: http://pygtk.org/pygtk2reference/class-gtktogglebutton.html.  Unless you want to work up your own test program, it's probably OK just to leave this closed as fixed until we run into an example in the wild.  Thanks!
Comment 16 Joanmarie Diggs (IRC: joanie) 2007-11-29 19:36:25 UTC
In Nautilus, if you bring up the properties dialog of a folder and switch to the Permissions pane, near the bottom there's a checkbox labeled "Execute."  When you click on it, it cycles between unchecked, checked, and a horizontal line.  Is that the thing you're after?
Comment 17 Scott Haeger 2007-11-29 19:47:59 UTC
Apparently not or GTK+ uses different states.  Here are the relevant states that the Nautilus example checkboxtristate uses to differentiate the three states:
checked: checked, armed
unchecked: no relevant state
indeterminate: checked

What do the three states represent in that example?

I'm off to look for more examples.