Community
Participate
Working Groups
The JFace ToolBarManager adds an accessible listener to automatically use a graphic ToolItem's tooltip text as its accessible name. This does not work for split buttons (aka ToolItems with DROP_DOWN style). To see this, run inspect32.exe and tab or arrow through the Eclipse tool bar. The tool items with a drop down menu will have role "split button" but they will not have a name.
Created attachment 174468 [details] initial patch This patch needs further testing (i.e. add/delete tool items was not tested) but I am attaching it here so that it is not lost. With this patch, the ToolBarManager needs some additional code as well, something along the lines of the following (which was taken from the AccessibleToolBarTest snippet in the Car project): toolBar.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() { public void getChild(AccessibleControlEvent e) { Accessible accessible = (Accessible) e.getSource(); ToolBar toolBar = (ToolBar) accessible.getControl(); final ToolItem item = toolBar.getItem(e.childID); if (item != null && (item.getStyle() & SWT.DROP_DOWN) != 0) { e.accessible.addAccessibleListener(new AccessibleAdapter() { public void getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) { e.result = item.getToolTipText(); } } }); } } });
Created attachment 177136 [details] new patch New patch that does not require any JFace changes. Still needs further testing for add/remove of tool items.
Created attachment 177264 [details] final patch
Final patch does not require JFace changes, and add/dispose has been tested. Eclipse toolbar has been tested. SSQ, please review for 3.6.1.
3.7 patch is the same.
Fixed > 20200823 in 3.6.1 stream.
Fixed > 20100823 in HEAD for 3.7.
Changing from "Closed->Fixed" to "Resolved->Fixed".