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 523018 - Orca does not speak the role for edits in the find and replace dialog in openoffice
Orca does not speak the role for edits in the find and replace dialog in open...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
2.22.x
Other All
: High major
: ---
Assigned To: Orca Maintainers
Orca Maintainers
: 523466 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-17 18:16 UTC by Mike Pedersen
Modified: 2008-03-21 20:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Orca debug output whilst testing this problem. (22.74 KB, text/plain)
2008-03-18 16:47 UTC, Rich Burridge
  Details
Revision #1. (1.42 KB, patch)
2008-03-18 18:40 UTC, Rich Burridge
committed Details | Review
Patch #2 (4.00 KB, patch)
2008-03-19 20:06 UTC, Rich Burridge
committed Details | Review

Description Mike Pedersen 2008-03-17 18:16:29 UTC
1.  Open openoffice
2.  press control+f
3.  notice that you aren't told that you are in the edit for what you wish to find.
4.  tab to replace.  Notice that the replace field isn't announced either.  
You can actually navigate the text once it is entered but these fields should be reported.  
Hopefully this one can make 2.22.1 as it is a pretty nasty problem.  
This would also make a nice regression test.
Comment 1 Rich Burridge 2008-03-18 16:47:55 UTC
Created attachment 107551 [details]
Orca debug output whilst testing this problem.

First comment is that looking at the accessible component hierarchy
of this dialog with accerciser just shows the dialog with one child;
the "Search For" label. That seems broken.

I added in a little debug to the StarOffice.py script to print out
the component ancestry for "focus:" events. For those two related to
the Find and Replace dialog, we get:
+- app.name='soffice' name='soffice' role='application' state='' relations=''
  +- app.name='soffice' name='Find & Replace' role='dialog' state='active enabled sensitive showing visible' relations=''
    +- app.name='soffice' name='Search for' role='combo box' state='enabled sensitive showing visible' relations='labelled by'
      +- app.name='soffice' name='Search for' role='text' state='editable enabled focusable focused sensitive showing single line visible' relations='labelled by'

and

+- app.name='soffice' name='soffice' role='application' state='' relations=''
  +- app.name='soffice' name='Find & Replace' role='dialog' state='active enabled sensitive showing visible' relations=''
    +- app.name='soffice' name='Replace with' role='combo box' state='enabled sensitive showing visible' relations='labelled by'
      +- app.name='soffice' name='Replace with' role='text' state='editable enabled focusable focused sensitive showing single line visible' relations='labelled by'

So we are in a text field inside a combo box. Those text fields have 
"labelled by" relationships, presumably with the labels to just above
them.

I now need to dig deeper and find out why they aren't being spoken.
Comment 2 Rich Burridge 2008-03-18 17:41:33 UTC
The problem is that in the onFocus() method in StarOffice.py,
there is the following piece of code:

    def onFocus(self, event):
        """Called whenever an object gets focus. Overridden in this script
        so that we can adjust "focus:" events for children of a combo-box
        to just set the focus to the combo box. This is needed to help
        reduce the verbosity of focusing on the Calc Name combo box (see
        bug #364407).

        Arguments:
        - event: the Event
        """

        if event.source.parent.getRole() == pyatspi.ROLE_COMBO_BOX:
            orca.setLocusOfFocus(None, event.source.parent, False)
            return

If I comment that out, it does the right thing. Looks like I'll
need to add more code to force it just to return when in the Calc
Name combo box.

Comment 3 Rich Burridge 2008-03-18 18:40:40 UTC
Created attachment 107559 [details] [review]
Revision #1.

The attached patch now looks for a specific component hierarchy
in the onFocus() method in StarOffice.py, before adjusting to
do a orca.setLocusOfFocus() on the parent (i.e the Calc Name combo
box).

This now allows the two oowriter Find and Replace combo box lists
to be spoken.

Looking at bug #364407 (Shift+Ctrl+T in OOCalc results in very 
verbose output), I notice that I originally filed OOo issue #70955
http://www.openoffice.org/issues/show_bug.cgi?id=70955
against this problem, but asked them to close it because we were 
falling back on speaking the accessible description if there was 
no accessible name. I'm wondering now whether that was a mistake 
and we should ask them to give an accessible name to this component.
At the moment, with this patch, when we do Control-Shift-t to move 
to the Calc Name combo box, it speaks nothing.

Thoughts?

Mike, please test.
Comment 4 Mike Pedersen 2008-03-18 19:24:14 UTC
This now seems to work.  thanks much 
Comment 5 Rich Burridge 2008-03-18 20:02:54 UTC
Thanks Mike. Patch committed to SVN trunk and the gnome-2-22 branch.
Moving to "[pending]".

We still have the open question about what (if anything) we want to
do about the accessible name for the Calc Name combo box. See 
comment #3 for more details.
Comment 6 Willie Walker 2008-03-19 15:57:12 UTC
(In reply to comment #3)
> no accessible name. I'm wondering now whether that was a mistake 
> and we should ask them to give an accessible name to this component.
> At the moment, with this patch, when we do Control-Shift-t to move 
> to the Calc Name combo box, it speaks nothing.

I think we definitely want to present something when the focus shifts from the table to the combobox.  I'm not sure I understand exactly where we were and where we are now, though.  Is this behavior a regression?
Comment 7 Rich Burridge 2008-03-19 16:22:29 UTC
Depends what you mean by regression. Without the "fix" for bug #364407,
Orca spoke the accessible description for that component which was
very verbose. With the fix it speaks nothing when you Control-Shift-t
to the Name combo box in oocalc. As mentioned, there is no accessible
name currently associated with that component.
Comment 8 Willie Walker 2008-03-19 16:52:49 UTC
(In reply to comment #7)
> Depends what you mean by regression. Without the "fix" for bug #364407,
> Orca spoke the accessible description for that component which was
> very verbose. With the fix it speaks nothing when you Control-Shift-t
> to the Name combo box in oocalc. As mentioned, there is no accessible
> name currently associated with that component.
> 

Presenting *something* when the focus changes is probably preferred, but the really verbose output is bad.  I'm guessing getting the OOo folks to set the name of the combobox, list, and text area to "Name Box" (the tooltip I see when I hover over the beast) would probably be the best option.

But, I'm still curious why we aren't presenting anything, such as at least the role name.
Comment 9 Rich Burridge 2008-03-19 20:06:04 UTC
Created attachment 107645 [details] [review]
Patch #2

> But, I'm still curious why we aren't presenting anything, 
> such as at least the role name.

Will and I discussed this a little while ago. The way I was doing
this (by setting 'event.source.name = _("Move to cell")' in section #5
of the locusOfFocusChanged() method in StarOffice.py won't work in
the pyatspi world.

The code has been revamped. Now, when you Control-Shift-t to the oocalc
Name combo box you get:
BRAILLE LINE:  'soffice Application Untitled1 - OpenOffice.org Calc Frame Untitled1 - OpenOffice.org Calc RootPane ToolBar List'
     VISIBLE:  'List', cursor=1
SPEECH OUTPUT: 'Move to cell'

I've also updated the regression test for this bug to reflect these changes.

New patch not checked in yet. 

Please test.
Comment 10 Rich Burridge 2008-03-20 20:41:37 UTC
I've gone ahead and checked the second patch in as it's going to be
needed to fix bug #523466 (or close as a duplicate). Moving to "[pending]".
Comment 11 Rich Burridge 2008-03-20 20:44:56 UTC
*** Bug 523466 has been marked as a duplicate of this bug. ***
Comment 12 Mike Pedersen 2008-03-21 18:49:54 UTC
This one seems to be working well.  thanks