GNOME Bugzilla – Bug 171865
tree items are not reported
Last modified: 2005-04-06 06:56:35 UTC
Run SwingDemo Start gnopernicus Move to tag 'Tree' Move to the 'Music' Tree Speech reports the tree name ('Musical Tree') If you move, using arrows, through the tree items, the items are not reported
This bug is present because the FOCUSED state is not present for current selected item. This case is also present in SwingSet, JTree demo page.
Created attachment 39343 [details] [review] proposed patch
I am wary of changing the toolkit's semantics for 'FOCUSSED'. Wouldn't it make as much sense to add 'ACTIVE' to the set of states which the client (i.e. gnopernicus) accepts?
Bill, what is the meaning of ACTIVE state for a tree item? And how this state differs from ENABLED?
Comment on attachment 39343 [details] [review] proposed patch if (role == AccessibleRole.TREE || role == AccessibleRole.TABLE) A better check here is for MANAGE_DESCENDANTS. But, this state is not present for this object, even if it fires "object:active-descendant-changed" events.
ACTIVE is the state associated with the 'Active' item within a container, for Java apps. For our purposes, it's the state that means 'the item within a FOCUSSED container which is currently 'Active' with respect to the keyboard'. So I think that we can use logic FOCUSSED || ACTIVE when dealing with the children of FOCUSSED containers, in gnopernicus, to deal with this bug.
What conatainer means? An object with a specific role (TREE, TABLE) or an object with a specific state (MANAGES_DESCENDANTS)? Bill, is ACTIVE state present only in such situations, except windows, dialogs? Otherwise this check may have side-effects.
Created attachment 39421 [details] [review] proposed patch This patch checks if an object has ACTIVE state in case of an internal(for gnopernicus) focus event.
By 'container' I meant any object containing children; you could of course restrict this heuristic to 'objects somewhere inside containers of a certain sort', for instance children (or "grand-children", etc.) of ROLE_TREE, ROLE_TREE_TABLE, ROLE_TABLE, ROLE_LIST, ROLE_CANVAS.
Comment on attachment 39421 [details] [review] proposed patch please commit after testing with GNOME tables
Oana, can you or someone else test and commit this patch ?
Patch committed to head.