Issue 123631

Summary: [ia2] Focus broken after exiting a context menu with an item selected
Product: General Reporter: James Teh <jamie>
Component: accessibilityAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: issues, steve.yin.aoo, vsfoote
Version: 4.1.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121767    

Description James Teh 2013-11-05 01:05:24 UTC
Str:
1. Start Calc.
2. Press the applications key or shift+f10 to open the context menu.
3. Press down arrow to select the first item.
4. Press escape to close the menu.
Expected: Ideally, a focus event should be fired on the now focused cell. Alternatively, a menuPopupEnd event should be fired and the now focused cell should report as focused; i.e. it should have the focused state and IAccessible::accFocus should lead there.
Actual: No focus event is fired. A menuPopupEnd event is fired, but IAccessible::accFocus on the root pane returns nothing. The focused cell does not have the focused state.

This does not happen if you don't select an item before closing the context menu; i.e. you press the applications key, then press escape. This suggests that OpenOffice has some concept of accessibility focus which is set to the selected menu item but isn't updated when the menu is closed.
Comment 1 James Teh 2013-11-05 01:06:32 UTC
Impact: Focus is broken for screen reader users after this occurs.
Comment 2 V Stuart Foote 2013-11-07 04:04:39 UTC
Confirming the focus issue on Windows 7 sp1 64-bit with:
AOO410m1(Build:9750)  -  Rev. 1538508
Rev.1538508

but

(In reply to James Teh from comment #1)
> Impact: Focus is broken for screen reader users after this occurs.

yes, but a cursor key movement will move focus away the ia2 role rootPane / msaa accRole clientArea that results after the pop-up, and onto the adjacent tableCell in the active sheet

Actions other than the context menu produce the same effect--pretty much any pop-up window that moves focus from the active pane.  Seems correct action on pop-up close should be to return focus to the previously active element.
Comment 3 James Teh 2013-11-07 04:24:14 UTC
(In reply to V Stuart Foote from comment #2)
> > Impact: Focus is broken for screen reader users after this occurs.
> yes, but a cursor key movement will move focus away the ia2 role rootPane /
> msaa accRole clientArea that results after the pop-up, and onto the adjacent
> tableCell in the active sheet
True. Still, most users will be confused by this.

> Seems correct action
> on pop-up close should be to return focus to the previously active element.
MSAA does allow the server to just fire a menuPopupEnd event when a popup menu is closed without firing a focus event. However, if this is done, accFocus and the focused state should be correct to allow an AT to find the focus. (Imo, this is one of the more annoying/silly conventions of MSAA, but such is life.)