Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276566 - Mac Cocoa Toolbars/Toolitems are not traversable with the keyboard
Summary: Mac Cocoa Toolbars/Toolitems are not traversable with the keyboard
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.6   Edit
Assignee: Scott Kovatch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 275957 (view as bug list)
Depends on:
Blocks: 252646
  Show dependency tree
 
Reported: 2009-05-15 16:48 EDT by Carolyn MacLeod CLA
Modified: 2010-05-06 18:12 EDT (History)
7 users (show)

See Also:


Attachments
partially working patch (6.46 KB, patch)
2009-05-15 16:59 EDT, Carolyn MacLeod CLA
no flags Details | Diff
Final patch (5.87 KB, patch)
2010-04-02 18:01 EDT, Scott Kovatch CLA
no flags Details | Diff
Additional patch (2.85 KB, patch)
2010-04-05 13:41 EDT, Scott Kovatch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2009-05-15 16:48:34 EDT
3.5 RC1

See bug 117340 for background info, except that this bug is for Cocoa (bug 117340 is for Carbon).

With Cocoa, however, we have a better chance of fixing this to work the way it works on other SWT platforms: i.e. use TAB, SHIFT+TAB, CTRL+TAB, and CTRL+SHIFT+TAB to navigate to a toolbar, and then use arrow keys to navigate within a toolbar.
Comment 1 Carolyn MacLeod CLA 2009-05-15 16:59:39 EDT
Created attachment 136073 [details]
partially working patch

Here is a patch that was hacked up by SSQ right before 3.5 RC1. Note that this patch only partially works. Problems are:
- SHIFT+TAB and CTRL+SHIFT+TAB still need to be made to work
- After cycling through all of the controls with TAB or CTRL+TAB, the second time through the controls only gives focus to every 2nd toolbar
- if all of the items in a toolbar are disabled, the toolbar is given focus anyhow (but none of the items will have the glowing focus ring because they are all disabled)  (other platforms skip entirely-disabled toolbars  during traversal).


However, note that this patch does allow keyboard navigation through toolbars. It just needs a bit more work. We should do this for 3.6.
Comment 2 Markus Keller CLA 2010-03-18 05:03:56 EDT
Any plans to release this for 3.6?
Comment 3 Scott Kovatch CLA 2010-03-18 11:20:01 EDT
I'm starting up SWT work again as of tomorrow, but with EclipseCon I probably won't look at this right away. But yes, I think we should be able to do this for 3.6.
Comment 4 Scott Kovatch CLA 2010-04-01 19:44:14 EDT
Changed the name to reflect what this bug wants fixed. This bug is tracking the fact that traversal via the tab key is broken in toolbars.

There is an additional problem in that toolbars aren't seen in the accessibility hierarchy, so VoiceOver doesn't work, so they aren't 'accessible' in that sense. Tracked in bug 307947.
Comment 5 Scott Kovatch CLA 2010-04-02 18:00:17 EDT
The patch here is mostly correct except for when we attempt to restore focus to the ToolItem that last had focus. When we get a FocusOut event the first responder has already been changed, so when we try to save the focussed item we're actually tracking a ToolItem in the ToolBar we are moving to, not the one in the toolbar that had the focus.

Fix is to track the focused ToolItem when we change it or remove it and don't worry about focus events.
Comment 6 Scott Kovatch CLA 2010-04-02 18:01:20 EDT
Created attachment 163749 [details]
Final patch

Final patch
Comment 7 Scott Kovatch CLA 2010-04-02 18:03:19 EDT
Fixed > 20100402.
Comment 8 Scott Kovatch CLA 2010-04-05 13:41:13 EDT
Created attachment 163819 [details]
Additional patch

This patch is also needed to prevent multiple keyDowns from being generated on some controls.
Comment 9 Scott Kovatch CLA 2010-05-06 18:12:42 EDT
*** Bug 275957 has been marked as a duplicate of this bug. ***