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 341371 - Orca will not report the file name in file picker when there is only one file existing in current folder.
Orca will not report the file name in file picker when there is only one file...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
0.2.x
Other opensolaris
: High major
: ---
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-11 05:50 UTC by Tim Miao
Modified: 2006-08-04 15:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Potential fix for the problem. (1.89 KB, patch)
2006-06-28 18:26 UTC, Rich Burridge
none Details | Review
New patch that fixes the problem more cleanly. (1.86 KB, patch)
2006-07-17 21:08 UTC, Rich Burridge
none Details | Review
Another potential fix. Thirds times the charm. (1.03 KB, patch)
2006-08-02 19:23 UTC, Rich Burridge
none Details | Review

Description Tim Miao 2006-05-11 05:50:11 UTC
Steps to reproduce:
1. Launch orca and other gnome app, say gedit.
2. Open a local file. File picker will be launched.
3. Make sure there is only one eiditable text file in the directory which you opened.

Expected result:
Orca could report the file name of this file.

Actual result:
Orca only report Open files dialog..., file. The file name will not be reported by orca.

Additional info:
This bug can be found on vermillion_40/snv_39 with gnome2.14.
Comment 1 Willie Walker 2006-05-16 13:26:57 UTC
When an object that manages it descendants is given focus, Orca does not traverse the children to see which one is the real "active" descendant.  Orca instead waits for the object to issue an active descendant changed event.  The reason for this is that manages descendants objects are designed to have a very large number of children, which can be a performance problem if Orca chooses to search them all for the selected/active/focused descendant.

The main problem here is that the table displaying the list of files is not issuing an active descendant changed event when the dialog first appears.  This may or may not be legal, but perhaps Orca should consider implementing an algorithm to efficiently determine the active descendant of an object.
Comment 2 Rich Burridge 2006-06-27 15:19:30 UTC
I just tried this again with vermillion build 43 and Orca from
CVS HEAD. I created a single file called "junk" in a new directory.
I started orca, then started gedit. I typed Control-o to bring up the
file open dialog, and Orca happily spoke the filename. 

...
BRAILLE LINE:  'gedit Application Open Files... Dialog'
     VISIBLE:  'Open Files... Dialog', cursor=1
SPEECH OUTPUT: 'Open Files⦠dialog'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader junk Today'
     VISIBLE:  'junk Today', cursor=1
SPEECH OUTPUT: 'Files table'
SPEECH OUTPUT: 'Name column header'
SPEECH OUTPUT: 'junk Today'
...

Tim, are you still seeing this problem with the latest Orca?
Comment 3 Mike Pedersen 2006-06-27 15:59:31 UTC
The problem happens more when drilling down into the file system IE pressing enter to go into a directory with only one file.  
Comment 4 Rich Burridge 2006-06-27 16:18:49 UTC
Mike, I just tried this (see debug output below) and it seems
to work just fine. I started in my home directory. I then entered
"t" to quickly get to the entries in the file open dialog that
started with "t". I then arrowed down to the "tmp" enter and pressed
Return. In that "tmp" directory was a single editable file (junk). 
Orca happily spoke the filename.

Can you give me explicit instructions on how to recreate the problem? 

Thanks.

...
BRAILLE LINE:  'gedit Application Unsaved Document 1 - gedit Frame'
     VISIBLE:  'Unsaved Document 1 - gedit Frame', cursor=1
SPEECH OUTPUT: 'Unsaved Document 1 - gedit frame'
BRAILLE LINE:  'gedit Application Unsaved Document 1 - gedit Frame TabList Unsaved Document 1 ScrollPane  $l'
     VISIBLE:  ' $l', cursor=1
SPEECH OUTPUT: 'tab list Unsaved Document 1 page'
SPEECH OUTPUT: 'text '
SPEECH OUTPUT: 'left control'
SPEECH OUTPUT: 'O'
BRAILLE LINE:  'No focus'
     VISIBLE:  'No focus', cursor=0
SPEECH OUTPUT: 'No focus'
BRAILLE LINE:  'gedit Application Open Files... Dialog'
     VISIBLE:  'Open Files... Dialog', cursor=1
SPEECH OUTPUT: 'Open Files… dialog'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader ARC 09/26/05'
     VISIBLE:  'ARC 09/26/05', cursor=1
SPEECH OUTPUT: 'Files table'
SPEECH OUTPUT: 'Name column header'
SPEECH OUTPUT: 'ARC 09/26/05'
SPEECH OUTPUT: 't'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader tcltk 05/22/03'
     VISIBLE:  'tcltk 05/22/03', cursor=1
SPEECH OUTPUT: ''
SPEECH OUTPUT: 'tcltk 05/22/03'
BRAILLE LINE:  'gedit Application Window t $l'
     VISIBLE:  'gedit Application Window t $l', cursor=27
SPEECH OUTPUT: 'window'
SPEECH OUTPUT: 'text t'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader thunderbird Yesterday'
     VISIBLE:  'thunderbird Yesterday', cursor=1
SPEECH OUTPUT: 'Open Files… dialog Files table'
SPEECH OUTPUT: 'Name column header'
SPEECH OUTPUT: 'thunderbird Yesterday'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader tmp Today'
     VISIBLE:  'tmp Today', cursor=1
SPEECH OUTPUT: ''
SPEECH OUTPUT: 'tmp Today'
SPEECH OUTPUT: 'Return'
BRAILLE LINE:  'gedit Application Open Files... Dialog ScrollPane Files Table Name ColumnHeader junk Today'
     VISIBLE:  'junk Today', cursor=1
SPEECH OUTPUT: ''
SPEECH OUTPUT: 'junk Today'
...
Comment 5 Tim Miao 2006-06-28 01:36:52 UTC
Hi Rich,
This bug can not be reproduced on orca 0.2.5 release with the steps in description any more. But I find it with following steps:
1. Make one sub-folder named with test in your Desktop folder.
2. Touch a text file in this new folder.
3. Start orca and gedit.
4. Press Ctrl+O to launch file picker, in common, the focus will be on Desktop folder in your home directory.
5. Press Enter, the focus will be on test folder.
6. Press Enter, the only text file you created in step 2 will be selected.

Bug observation:
After step 5 and 6, the folder name and file name will not be reported.

Additional info:
Orca will report the file/directory name when you press left/right arrow.

I can reproduce this bug with orca 0.2.5 on vermillion_43/snv_42.

Hope this helps.
Comment 6 Rich Burridge 2006-06-28 15:45:57 UTC
Thanks Tim. Using these steps I can recreate the problem. 
Investigating now...
Comment 7 Rich Burridge 2006-06-28 16:54:47 UTC
What's happening here is that when you do the Control-o
to bring up the File Open dialog, the table of filenames
is getting a "focus:" event and nicely speaking the currently
selected filename (the "test" folder).

When you then hit Return to go into the "test" directory,
you do not get any more focus events. You do get several
of the following events though:

object:state-changed:visible
object:children-changed:add
object:property-change:accessible-name
object:property-change:accessible-role
object:selection-changed
object:state-changed:showing
object:property-change:accessible-value
object:state-changed:sensitive

The problem now will be to decide which one would be the
best one to use to try to braille/speak the new situation. 
My guess is the "object:selection-changed" events on the
table within the file chooser.
Comment 8 Rich Burridge 2006-06-28 18:26:55 UTC
Created attachment 68129 [details] [review]
Potential fix for the problem.

The attached patch seems to fix the problem, but there
is a GrossHack(TM) in there.

The new logic is in onSelectionChanged() in default.py.
We check to see if the "object:selection-changed" event
is for a table. If so, we look to see which child
is currently selected (I copied the code from the onFocus()
method).

The problem with this is this piece of code in
locusOfFocusChanged:

        if newParent and (oldParent == newParent):
            state = newParent.state
            if state.count(atspi.Accessibility.STATE_MANAGES_DESCENDANTS) \
                and (oldLocusOfFocus.index == newLocusOfFocus.index) \
                and (oldLocusOfFocus.name == newLocusOfFocus.name):
                    return

This is bug #319675. This would cause locusOfFocusChanged() to
just return in this situation. The GrossHack to get around this
s to set orca.locusOfFocus to None just before calling
orca.setLocusOfFocus() in onSelectionChanged. Ugh!

Will, over to you for comments.

It seems to work, but it's not nice. I also wonder what side-effects
it has on other things.

We probably want to do this for the other objects that do this code in
onFocus(). I.e. layered panes, tree tables and trees.
Comment 9 Willie Walker 2006-07-17 19:28:35 UTC
Rich and I chatted about this one.  The logic in the patch is very similar to the logic that's happening a few lines up for layered: we're saying the locus of focus is the recently selected child.  If these are indeed identical situations, perhaps a different patch for this problem might just use the same logic, but check for the role being a table or a layered pane?  
Comment 10 Rich Burridge 2006-07-17 21:08:18 UTC
Created attachment 69070 [details] [review]
New patch that fixes the problem more cleanly.

Will and I just worked through this. See attached patch.
Comment 11 Rich Burridge 2006-07-17 21:13:41 UTC
Changes checked into CVS HEAD. Closing as FIXED.
Comment 12 Rich Burridge 2006-07-21 18:20:28 UTC
Backing out this fix. It has detrimental side-effects on other things.
Reopening bug.
Comment 13 Rich Burridge 2006-08-02 19:23:59 UTC
Created attachment 70093 [details] [review]
Another potential fix. Thirds times the charm.
Comment 14 Rich Burridge 2006-08-02 19:28:08 UTC
I've tested this new fix against the symptoms of this
bug as reported by Tim. It also seems to nicely fix
bug #347691 for the print dialog. I also tested it
again the Open Dialog in StarOffice and it seems to have
no bad effects there (the reason why the prtevious patch 
was pulled).

Closing as fixed. I'd appreciate it if people could verify 
that this wotrks for them too.

Thanks.
Comment 15 Rich Burridge 2006-08-04 15:16:57 UTC
In fixing bug #347691, a nicer, cleaner fix was found that
also fixed this problem. See the attached patch for that bug
for more details.