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 338353 - [a11y]: Rename file in nautilus not spoken properly by screen reader.
[a11y]: Rename file in nautilus not spoken properly by screen reader.
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
2.14.x
Other All
: Normal normal
: ---
Assigned To: bill.haneman
Nautilus Maintainers
Depends on:
Blocks: 353432
 
 
Reported: 2006-04-13 14:34 UTC by Vincent Quigley
Modified: 2010-07-06 21:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Python script to reproduce the problem. (13.78 KB, text/plain)
2006-07-26 20:16 UTC, Rich Burridge
  Details
Transcript of accessibility events seen when running 338353.py (34.35 KB, text/plain)
2006-07-26 20:16 UTC, Rich Burridge
  Details
Proposed patch (647 bytes, patch)
2006-10-13 13:01 UTC, padraig.obriain
none Details | Review

Description Vincent Quigley 2006-04-13 14:34:01 UTC
Seen on Gnome 2.14 on sparc system with accessibility enabled.

Login as an accessible user.
Start Screen Reader
Open file browser and select a file.
Press F2 to change its name.
Change the name.
Press Return.

Also being tracked by Sun internal database CR6393022
Comment 1 korn 2006-04-17 20:41:39 UTC
Appending a crucial bit of info from Sun's CR6393022:

"Notice that the reader says the old name again and does not speak the new name."
Comment 2 Vincent Quigley 2006-05-09 10:26:31 UTC
Bug is on Orca, changing product
Comment 3 Willie Walker 2006-05-09 11:44:18 UTC
With the sources in GNOME CVS HEAD, Orca is speaking the new name, but it also speaks the old name before speaking the new name when you press "Return" to commit the new name.  In eye-balling Nautilus, this is actually what Nautilus is doing: the old name flashes temporarily on the display when you press return, then the new name appears.
Comment 4 Willie Walker 2006-05-09 14:56:01 UTC
It occurred to me we also need to clarify which type of view is being used in Nautilus.  I was using the list view when composing response #3.  When I use the icon view, I see the ill behavior described. 
 
This appears to be a nautilus or toolkit bug - it doesn't appear to be changing the accessible name of the icon until you move away and then move back to the object (e.g., arrow left then right).  I also checked this with accessible value caching in Orca turned on and off.
Comment 5 Vincent Quigley 2006-05-11 13:08:39 UTC
On my system arrow left then right will not update the name of the folder/file.  You need to either refresh or change directory and then change back.
Comment 6 Rich Burridge 2006-07-26 20:16:18 UTC
Created attachment 69685 [details]
Python script to reproduce the problem.
Comment 7 Rich Burridge 2006-07-26 20:16:55 UTC
Created attachment 69686 [details]
Transcript of accessibility events seen when running 338353.py
Comment 8 Rich Burridge 2006-07-26 20:19:41 UTC
I've attached two files:

338353.py         - python script to reproduce the problem.
338353.typescript - transcript of accessibility events seen when
                    trying to reproduce the problem.

To recreate, do the following:

Preparation:
------------
* Start up Nautilus in icon view.
* Create a new folder. Double click to view that (empty) folder.
* Create a new empty document.
* Rename it to be called "filea".

Reproducing the problem:
------------------------
* Start an xterm window.
* Start up a script to save the output and then run the script:

  % script
  % python 338353.py

* In the Nautilus window, use the mouse to give focus to the
  "filea" icon (if it doesn't already have focus).

* Press F2 to bring up the file name text area.

* Enter a new file name of "fileb" (without the quotes) and press
  Return.

* Terminate the Python script by Control-C in the xterm window.

* Close off the typescript with:

  % exit

  in the xterm window.

You will now have a typescript file similar to 338353.typescript
containing the accessibility events seen.

Understanding what you've got:
------------------------------
Working with 338353.typescript, here's some highlights:

* Look for a the first line starting with "keystroke" (line 77).
  This will be the F2 Press keyboard event.

* The second line starting with "keystroke" (line 110).
  will be the F2 Release keyboard event.

* Similar pairs (lines 133 and 160 for "f") show the new file name
  being typed in.

* The "keystroke" pair for typing Return are at lines 269 and 300.

* At line 305, you can see a "focus:" event but the name is still
  "filea", but there are no more "focus:" events for Nautilus.
  There are no "object:property-change:accessible-name" events either.

That's the problem. Orca can't detect that the filename has changed.

Transferring to the Nautilus team for further evaluation and adjusting
the summary accordingly.
Comment 9 padraig.obriain 2006-10-13 13:01:55 UTC
Created attachment 74630 [details] [review]
Proposed patch

Please check whetehr the propsoed patch fixes the problem.
Comment 10 Lynn Monsanto 2006-10-25 18:14:43 UTC
The proposed patch partially solves the problem. Orca receives a focus event followed by two AccessibleName property change events. However, the focus event still contains the old file name, so Orca speaks the old file name, and then speaks the new file name twice. We can handle the double AccessibleName events by checking whether the new AccessibleName is the same as the current AccessibleName. We are still left with the problem of speaking the old file name event after it has been changed. There are a couple possibilities for fixing the problem. (1) Have the focus change event contain the new name or (2) fire the AccessibleName event before the focus event. We can modify the Orca script for Nautilus to recognize the pattern and just speak the new AccessibleName.
Comment 11 padraig.obriain 2006-10-26 10:03:51 UTC
Does removing the call to g_object_notify in the patch remove the second AccessibleName property change event?

I do not think that either of your proposals are easy to implement in nautilus.

After editing of the label is completed the focus is returned to the icon container and the selected icon before the text on the icon is updated.
The text on the icon is updated in an idle handler after the file's name has actually been changed.

Would it be possible for orca to recognize the pattern of focus on icon, focus on label, focus on icon and postpone the reporting of the focus on the icon for a some period to wait for a possible AccessibleName property change?
Comment 12 Lynn Monsanto 2006-11-08 17:33:27 UTC
Padraig,

Unfortunately, I cannot build and run nautilus on my x86 PC running Edgy. I've repeatedly tried but I just get a core dump.  I've reported the crash to the nautilus team, but still have the problem.  I'll keep trying, but it would be great if you had the time to run the tests yourself.

Lynn
Comment 13 Willie Walker 2006-11-08 20:30:02 UTC
Padraig:  I just verified we can script around the behavior with the patch as is.  Soo...I say the patch is workable as is.
Comment 14 padraig.obriain 2006-11-10 09:27:54 UTC
Willie: would the patch be better for you if the line
g_object_notify (G_OBJECT(accessible), "accessible-name");
were omitted?
Comment 15 Willie Walker 2006-11-10 13:39:43 UTC
Padraig: the omission of the g_object_notify (G_OBJECT(accessible), "accessible-name"); line is bad and does not give us the information we need.  So...the patch as is seems to work fine for us and I was able to script around the problem of getting duplicate name change events in Orca.  

The duplicate name change event problem is something that we've run into several times, so getting it fixed in GAIL is a good thing (I think there's a patch you did for that, right?), and getting defensive code in Orca is also a good thing (I checked that in just the other day).
Comment 16 Alexander Larsson 2006-11-23 14:08:29 UTC
Commited patch.
Comment 17 Allan Day 2010-07-06 21:11:18 UTC
Changing component as a part of ongoing reorganisation work.