Issue 70922 - [a11y] Writer inappropriately gives a "focus:" event for the Format menu when dismissing the File->Wizards menu.
Summary: [a11y] Writer inappropriately gives a "focus:" event for the Format menu when...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2006-10-27 01:03 UTC by richburridge
Modified: 2013-08-07 14:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Standalone Python script that can reproduce this problem. (13.13 KB, text/plain)
2006-10-27 01:04 UTC, richburridge
no flags Details
Output from running the Python bug_464765.py script. (13.88 KB, text/plain)
2006-10-27 01:05 UTC, richburridge
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description richburridge 2006-10-27 01:03:40 UTC
See also Orca bug #364765, which is blocked by this bug.
http://bugzilla.gnome.org/show_bug.cgi?id=364765

I will attach a standalone Python script that just does at-spi
calls (no Orca code in sight), that reproduces this problem.

To reproduce this bug, follow these steps:

1) Run OpenOffice or StarOffice writer.
2) Run this standalone application in an xterm window using the python
   interpreter.
3) Give focus to the swriter window.
4) Type Alt-f to bring up the file menu.
5) Type "w" to bring up the Wizards sub-menu.
6) Type Esc to dismiss that Wizards sub-menu.
7) Press F12 to terminate this script.

Notice that when you dismiss the Wizards sub-menu, you get a "focus:"
event for the Format menu. This is wrong.
Comment 1 richburridge 2006-10-27 01:04:41 UTC
Created attachment 40096 [details]
Standalone Python script that can reproduce this problem.
Comment 2 richburridge 2006-10-27 01:05:36 UTC
Created attachment 40097 [details]
Output from running the Python bug_464765.py script.
Comment 3 richburridge 2006-10-27 01:07:07 UTC
The important part to look at in bug_364765.out are near the end of the file:

...
KEYSTROKE type=1 hw_code=9 modifiers=0 event_string=(Escape) is_text=True

focus: 0 0 <CORBA.any of type 'IDL:Accessibility/EventDetails:1.0'>
  name='Format' role='menu' state='ENABLED FOCUSED OPAQUE SELECTABLE SENSITIVE S
HOWING VISIBLE'
...
Comment 4 michael.ruess 2006-10-27 09:12:29 UTC
Reassigned to ES.
Comment 5 eric.savary 2006-12-01 15:04:44 UTC
ES->OBR: reproduced.

Note: the python script fires too many events. Best viewed with:
at-poke -> log events -> [x] focus
-> "generic event 'focus:' A|co|ac|te|va|se:menu:Format:Contains comm...(0) (0)"
Comment 6 richburridge 2006-12-01 16:15:33 UTC
Note that it's easy to customize the Python script to only
handle the events you are interested in. See the eventTypes
list starting about line 300. Just add a "#" character at 
the beginning of the line for each one you are not interested 
in.
Comment 7 nospam4obr 2006-12-05 13:18:45 UTC
obr->od: can you please evaluate whether this is a writer or a bridging issue ?
Thanks. 
Comment 8 Oliver-Rainer Wittmann 2006-12-11 10:09:21 UTC
OD->TBE:
Please take over and investigate, if the accessibility implementation for menus
or the the access bridge causes this defect. Thx.
Comment 9 thomas.benisch 2007-04-18 12:04:42 UTC
set target OOo 2.x
Comment 10 thomas.benisch 2007-04-18 12:05:55 UTC
The state change focus event for the Format menu item
is wrongly generated in vcl and forwarded by the
accessibility implementation for menus.

In vcl/source/window/menu.cxx, l.4641 it can be seen, that
ImplCallHighlight is called at the wrong parent; in this case
at the menubar instead of the File popup menu.
Therefore this issue can be fixed by replacing

  if (pPopupMenu->pStartedFrom)
      pPopupMenu->pStartedFrom->ImplCallHighlight(pFloat->nHighlightedItem);

with

  if (pPopupMenu)
      pPopupMenu->ImplCallHighlight(pFloat->nHighlightedItem);

In addition, the
                
  DBG_ASSERT( pPopupMenu->pStartedFrom, "popup mysteriously killed" );

line should be moved right after the

  PopupMenu* pPopupMenu = (PopupMenu*)pMenu->pStartedFrom;

line.
Comment 11 thomas.benisch 2007-04-18 12:07:33 UTC
reassign issue to PL
Comment 12 philipp.lohmann 2007-04-18 12:34:24 UTC
fixed in CWS vcl78

the DBG_ASSERT is now useless since the case where pStartedFrom from the
original menu is NULL is already handled.
Comment 13 philipp.lohmann 2007-05-15 17:45:46 UTC
please verify in CWS vcl78
Comment 14 eric.savary 2007-06-05 11:52:36 UTC
Verified.

Now shows:
-> "generic event 'focus:' A|co|ac|te|va|se:menu:Wizards:Contains comm...(0) (0)"
Comment 15 eric.savary 2007-07-06 18:06:51 UTC
Ok in m219