Opened 13 years ago

Closed 9 years ago

#8513 closed defect (invalid)

Menu: reversed focus events on menu and menu items when menu is first opened

Reported by: wwalker Owned by: wwalker
Priority: high Milestone: future
Component: Accessibility Version: 1.2.3
Keywords: Cc: davidb, Joseph Scheuhammer
Blocked By: Blocking:

Description (last modified by bill)

1) Go to[[BR]]

2) Tab to the "Edit!" button

3) Press the down arrow to open the menu

A focus event for the "Cut" menu item is issued first and then a focus event for the menu itself is issued. These are reversed -- the result is that an assistive technology thinks the menu has focus and not the menu item. Note that this is only when the menu is first opened. If you press the down arrow again to go to "Copy", the desired focus event is issued.

The attached file is a simple AT-SPI based python application that can be used to demonstrate the problem on GNOME. Here's an example of the reversed focus event ordering:

focus:(0, 0, None)

source: [menu item | Cut] host_application: [application | Firefox]

focus:(0, 0, None)

source: [menu | ] host_application: [application | Firefox]

Attachments (1) (175 bytes) - added by wwalker 13 years ago.
Runnable test case

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by wwalker

Attachment: added

Runnable test case

comment:1 Changed 13 years ago by bill

Component: GeneralAccessibility
Owner: changed from anonymous to Becky Gibson
Summary: Reversed focus events on menu and menu items when menu is first openedMenu: reversed focus events on menu and menu items when menu is first opened

comment:2 Changed 13 years ago by Joseph Scheuhammer

Cc: Joseph Scheuhammer added

comment:3 Changed 13 years ago by Joseph Scheuhammer

FWIW, I added JavaScript focus and blur listeners to the menu and to its "Cut" and "Copy" menu items. Testing, with FF3/Mac and FF3/WinXP using the procedure outlined above, showed focus/blur events on the menu items only. The menu didn't acquire focus.

Dropping into FireBug's console, and calling focus() on the menu still does not give it focus. This is not surprising since its visibility style is 'hidden'.

In addition, on WinXP, using !AccEvent32 to watch OS events, showed focus events only for the menu items, and not for the menu.

Noting that none of the above tests are for GNOME/AT-SPI...

Here is the <script> I added to the <head> of "test_Button.html" -- the focus/blur listeners:

<script type="text/javascript">
  dojo.addOnLoad(function() {
    var menu = dojo.byId('dijit_Menu_0');
    var cutItem = dojo.byId('dijit_MenuItem_2');
    var copyItem = dojo.byId('dijit_MenuItem_3');
    dojo.connect(menu, "onfocus", function() { console.log ("Edit! FOCUS"); });
    dojo.connect(menu, "onblur", function() { console.log ("Edit! BLUR"); });
    dojo.connect(cutItem, "onfocus", function() { console.log ("CUT FOCUS"); });
    dojo.connect(cutItem, "onblur", function() { console.log ("CUT BLUR"); });
    dojo.connect(copyItem, "onfocus", function() { console.log ("COPY FOCUS"); });
    dojo.connect(copyItem, "onblur", function() { console.log ("COPY BLUR"); });

comment:4 Changed 13 years ago by Becky Gibson

Milestone: tbdfuture

comment:5 Changed 11 years ago by Chris Mitchell

Owner: changed from Becky Gibson to bill

reassign due to inactive committer. please triage accordingly.

comment:6 Changed 10 years ago by bill

Description: modified (diff)

comment:7 Changed 9 years ago by bill

Owner: changed from bill to wwalker
Status: newpending

Is this still an issue? I don't understand what you mean by "a focus event is issued".

comment:8 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.