GNOME Bugzilla – Bug 468551
Support ARIA checkboxTriState
Last modified: 2008-07-22 19:32:40 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
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.
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 :(
(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!
> > 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
Created attachment 94147 [details] [review] third version of Support ARIA checkboxTriState patch referenced in above comment
> 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. :-(
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.
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.
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?
Created attachment 99733 [details] [review] post pyatspi version post pyatspi migration version
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.
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.
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!
Tested everything except a GTK+ checkboxtristate. Is there an example that you know of? Committed to repository.
(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!
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?
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.