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 497218 - No "object:active-descendant-changed" generated when arrowing into table in gtk-demo Tree View -> List Store demo.
No "object:active-descendant-changed" generated when arrowing into table in g...
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
git master
Other Linux
: Immediate normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks: 486895
 
 
Reported: 2007-11-15 22:17 UTC by Rich Burridge
Modified: 2008-01-09 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.43 KB, patch)
2008-01-07 10:58 UTC, Li Yuan
none Details | Review
Orca debug.out generated whilst testing this problem. (31.84 KB, text/plain)
2008-01-07 17:48 UTC, Rich Burridge
  Details
Orca debug.out generated whilst testing this problem. (29.77 KB, text/plain)
2008-01-07 17:49 UTC, Rich Burridge
  Details
patch based on gail (1.44 KB, patch)
2008-01-08 03:43 UTC, Li Yuan
none Details | Review
accerciser output (1.31 KB, text/plain)
2008-01-08 03:44 UTC, Li Yuan
  Details
output from orca (123.55 KB, text/plain)
2008-01-08 04:22 UTC, Li Yuan
  Details
final patch (1.89 KB, patch)
2008-01-09 12:36 UTC, Li Yuan
committed Details | Review

Description Rich Burridge 2007-11-15 22:17:12 UTC
See also Orca bug #486895 which is affected by this problem.
In particular, the evaluation in comment #2:
http://bugzilla.gnome.org/show_bug.cgi?id=486895#c2

----

Steps to reproduce:

0. Run Orca.

1. Run gtk-demo Tree View -> List Store demo.  The demo comes up
   with the "Bug Number" column header with focus.

2. Arrow right twice to the "Description" column header.

3. Arrow down once.

In Orca at this point, we get an "object:state-changed:focused" event
for the table.

OBJECT EVENT: object:state-changed:focused             detail=(1,0)
    app.name='gtk-demo' name='None' role='table' state='enabled focusable focused sensitive showing visible manages descendants' relations=''

The problem is that we have not had (not do we subsequently get) an
"object:active-descendant-changed" event for the child in the table 
which has just been selected.

We are unable to derive this information (which table cell is currently
selected) from the information provided by just the
"object:state-changed:focused" event.
Comment 1 Willie Walker 2008-01-04 21:41:45 UTC
Just ping'ing on this one.  Li, any ideas?
Comment 2 Li Yuan 2008-01-07 09:35:58 UTC
Except the bug described, I also found there is no focus state for the focused cell except the first one. By searching the history, maybe this is a regression many years ago...
Comment 3 Li Yuan 2008-01-07 10:58:31 UTC
Created attachment 102310 [details] [review]
proposed patch

emit "active-descendant-changed" when focus come into the table body, and add focus state to the focused cell.
Comment 4 Rich Burridge 2008-01-07 17:48:32 UTC
Created attachment 102331 [details]
Orca debug.out generated whilst testing this problem.

Patch NOT applied yet (i.e. the "before" case).
Comment 5 Rich Burridge 2008-01-07 17:49:12 UTC
Created attachment 102332 [details]
Orca debug.out generated whilst testing this problem.

With patch applied.

Commentary to follow.
Comment 6 Rich Burridge 2008-01-07 17:51:15 UTC
Li, I could not get the second part of these diffs to correctly
apply using patch against gail SVN HEAD (revision 1318). 

I was able to work out from the context diffs, where the patch
should go (offset by quite a large chunk), so I applied it by hand.
I believe it successfully applied and I was able to build/install
gail. To be positive, it would be better if you could regenerate
a new patch against latest SVN HEAD.

Even then, I don't think it's doing the correct thing. There are
no new "object:active-descendant-changed" events.

Here's a more detailed analysis.

I've attached two orca debug.out's:

1/ A test run without the patch being applied.
2/ A test run with the patch applied.

The "without patch" case.
=========================
From the first one (the "without patch" case), you will see we do
the Down key event to move from the Description column header
into the table at line 470. After that we get the following events:

Line 480:
---------> QUEUEING EVENT object:state-changed:focused
Line 483:
vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(0,0)
    app.name='gtk-demo' name='Description' role='table column header' state='enabled focusable focused selectable sensitive showing visible' relations=''
Finding top-level object for source.name=Description

Line 485:
---------> QUEUEING EVENT object:state-changed:focused
Line 497:
vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(1,0)
    app.name='gtk-demo' name='None' role='table' state='enabled focusable focused sensitive showing visible manages descendants' relations=''

This event causes
SPEECH OUTPUT: 'Fixed? column header'
to be spoken (see line 579)

Other events queued for this key down are:

Line 486:
---------> QUEUEING EVENT object:selection-changed
Line 499:
---------> QUEUEING EVENT focus:



The "with patch" case.
======================
For the second one (the "with patch" case), you will see we do
the Down key event to move from the Description column header
into the table at line 470. After that we get the following events:

Line 480:
---------> QUEUEING EVENT object:state-changed:focused
Line 483:
vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(0,0)
    app.name='gtk-demo' name='Description' role='table column header' state='enabled focusable focused selectable sensitive showing visible' relations=''

Line 485:
---------> QUEUEING EVENT object:state-changed:focused
Line 497:
vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(1,0)
    app.name='gtk-demo' name='None' role='table' state='enabled focusable focused sensitive showing visible manages descendants' relations=''

This event again causes
SPEECH OUTPUT: 'Fixed? column header'
to be spoken (see line 579)

Other events queued for this key down are:

Line 486:
---------> QUEUEING EVENT object:selection-changed
Line 511:
---------> QUEUEING EVENT focus:

I do not see any new "object:active-descendant-changed" events.
Comment 7 Rich Burridge 2008-01-07 18:05:34 UTC
Sorry, that should have been rev 1308 of gailtreeview.c (not 1318).
Comment 8 Li Yuan 2008-01-08 03:43:02 UTC
The patch was made against gtk+ SVN HEAD since gail has been moved to gtk+ HEAD (will not released with GNOME 2.22). 

I made a new patch with gail module and have tested with accerciser. No matter which patch is attached (the gtk+ one or the gail one), I can see "object:active-descendant-changed" emitted when press DOWN in "Description" column header, output attached. I only listened "object:state-changed" and "object:active-descendant-changed".

BTW, I don't see object:state-changed:focused(1, 0, None) emitted from column header when press RIGHT, is this a bug bothers ORCA?
Comment 9 Li Yuan 2008-01-08 03:43:36 UTC
Created attachment 102363 [details] [review]
patch based on gail
Comment 10 Li Yuan 2008-01-08 03:44:07 UTC
Created attachment 102364 [details]
accerciser output
Comment 11 Rich Burridge 2008-01-08 04:00:48 UTC
> The patch was made against gtk+ SVN HEAD since gail has been moved to gtk+ HEAD
> (will not released with GNOME 2.22).

Ah, I didn't realize. I'll check out latest gtk+ from SVN HEAD
tomorrow and retry this.

Any chance of running the steps to reproduce this problem
with Orca debug turned on full, and attaching the debug.out
to this bug report please? If not, I'll try that tomorrow.

Steps to reproduce:

0. Run Orca.

1. Run gtk-demo Tree View -> List Store demo.  The demo comes up
   with the "Bug Number" column header with focus.

2. Arrow right twice to the "Description" column header.

3. Arrow down once.

Thanks.
Comment 12 Li Yuan 2008-01-08 04:22:41 UTC
Created attachment 102367 [details]
output from orca

In line 1897 I pressed Down. And line 2077 is the "object:active-descendant-changed" signal.
Comment 13 Li Yuan 2008-01-08 04:24:20 UTC
Please don't remove the gail.pc file installed by gail when you try gtk+ HEAD. gtk+ doesn't install gail.pc for now but at-spi and libgnomeui still depend on gail.
Comment 14 Rich Burridge 2008-01-08 06:31:34 UTC
Thanks Li. This looks like it's now doing the correct thing and the
patch can be checked in and the bug closed. Will, do you agree?

It also looks like we have some work still to do with Orca to
get it to do the right speaking.

As it currently stands (with reference to your debug.out):

It first processes an "object:state-changed:focused" event at line 1914:

vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(0,0)
    app.name='gtk-demo'           name='Description' role='table column header' state='ENABLED FOCUSABLE FOCUSED SELECTABLE SENSITIVE SHOWING VISIBLE' relations=''

Then an "object:state-changed:focused" event at line 1936:
vvvvv PROCESS OBJECT EVENT object:state-changed:focused vvvvv
OBJECT EVENT: object:state-changed:focused             detail=(1,0)
    app.name='gtk-demo'           name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations=''

and from that speaks:
SPEECH OUTPUT: 'Fixed? column header'
at line 2064

It then processes an "object:selection-changed" event at line 2070:
vvvvv PROCESS OBJECT EVENT object:selection-changed vvvvv
OBJECT EVENT: object:selection-changed                 detail=(0,0)
    app.name='gtk-demo'           name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations=''

Then the new "object:active-descendant-changed" at line 2077:
vvvvv PROCESS OBJECT EVENT object:active-descendant-changed vvvvv
OBJECT EVENT: object:active-descendant-changed         detail=(7,0)
    app.name='gtk-demo'           name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations=''

and from that speaks:
SPEECH OUTPUT: 'Description column header'

The problem really is that the first spoken line:
SPEECH OUTPUT: 'Fixed? column header'
is bogus. 

But that's because of the code in the onFocus() routine in default.py in
Orca always just taking the first selected child. See comment #2 of 
bug #486895
http://bugzilla.gnome.org/show_bug.cgi?id=486895#c2
for a more detailed analysis of this.

I'm not sure there is a simple fix for that. Unless we got the
"object:active-descendant-changed" event before the
"object:state-changed:focused" event...

Comment 15 Willie Walker 2008-01-08 14:17:22 UTC
(In reply to comment #14)
> Thanks Li. This looks like it's now doing the correct thing and the
> patch can be checked in and the bug closed. Will, do you agree?

I agree -- keep in mind that the patch needs to go into two places (the old gail and the new GTK+) since the GAIL integration into GTK+ won't be officially released until after GNOME 2.22.  See http://bugzilla.gnome.org/show_bug.cgi?id=169488#c28 of bug #169488 for information on that.

> It also looks like we have some work still to do with Orca to
> get it to do the right speaking.
> ...
> It first processes an "object:state-changed:focused" event at line 1914:
...
> Then an "object:state-changed:focused" event at line 1936:
...
> and from that speaks:
> SPEECH OUTPUT: 'Fixed? column header'
...
> It then processes an "object:selection-changed" event at line 2070:
...
> Then the new "object:active-descendant-changed" at line 2077:
...
> and from that speaks:
> SPEECH OUTPUT: 'Description column header'
...
> The problem really is that the first spoken line:
> SPEECH OUTPUT: 'Fixed? column header'
> is bogus. 
...
> I'm not sure there is a simple fix for that. Unless we got the
> "object:active-descendant-changed" event before the
> "object:state-changed:focused" event...

I'm not sure, either.  We could potentially make the object:active-descendant-changed event force a speech.stop() if it is going to end up presenting information.

Comment 16 Rich Burridge 2008-01-08 17:37:54 UTC
Li, in trying to fixup Orca to correctly handle the
new "object:active-descendant-changed" events, I discovered
a new test case where we are still not getting an
"object:active-descendant-changed" event.

See Orca bug #486895 for more details, in particular comment 10:
http://bugzilla.gnome.org/show_bug.cgi?id=486895#c10

Steps to reproduce:

1/ Start Orca.

2/ Start gtk-demo Tree View -> List Store demo.  
   The demo comes up with the "Bug Number" column header with focus.

3/ Arrow right twice to the "Description" column header.

4/ Arrow down twice.

5/ Arrow left once.
   Focus is on the "Critical" text in the Severity column.

6/ Press Shift-Tab. Focus is given to the "Severity" column header.

7/ Arrow down once.

Focus is back on the "Critical" text but Orca speaks:

SPEECH OUTPUT: ''
SPEECH OUTPUT: 'Fixed? column header'
SPEECH OUTPUT: 'check box not checked '

But it's the same problem. No "object:selection-changed" event,
so we are unable to setup the index of the child that can be used in
onFocus().

So what you've done certainly helps very much, but it looks like
there is another code path through gailtreeview.c that's going to
need to send this event.

Thanks.
Comment 17 Li Yuan 2008-01-09 05:49:00 UTC
Yes, the problem is we don't act when focus leave the table (shift-tab). So when focus comes in again, gail thinks it has been reported before and ignore it.
Comment 18 Li Yuan 2008-01-09 10:23:53 UTC
I filed a new bug for the problem (bug #508255). Patch is ready, will paste later.  I need to have dinner first and do some merge work from gail to gtk+ :)
Comment 19 Li Yuan 2008-01-09 12:36:17 UTC
Created attachment 102456 [details] [review]
final patch
Comment 20 Li Yuan 2008-01-09 12:37:35 UTC
I am going to close this bug and paste the patch to bug #508255.