Community
Participate
Working Groups
Build Identifier: With TableViewer cell, when getColumnImage returns the image with tooltip specified, image's tooltip can NOT be read out by JAWS when the table cell gains the focus. Only label text returned by getColumnText can be read out by JAWS. But we have a lot of cases that we only put image in the cell without having any label text in the cell, then JAWS will read nothing for this case. Reproducible: Always
You need to do 2 things to get JAWS to read the accessible name for an image in a table: 1) Tell JAWS to "Use MSAA for ListViews" as follows (note that you do not need to do this if you are running JAWS 14.0.399 or higher): - with <your app> and JAWS both running, give focus to <your app> and type INS+F2 - select Settings Center and OK - say OK to create a new JAWS configuration file with the name <your app> - in the Settings Center filter text, type MSAA - select the "Use MSAA for ListViews" checkbox and OK 2) Add an accessible listener to the Table to specify the accessible name for the current table item. Here is an SWT-only snippet that does this by using TableItem.setData() to store the name for an item: import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.accessibility.*; public class AccessibleTableWithIconsTest2 { static int[] Images = new int[] {SWT.ICON_ERROR, SWT.ICON_INFORMATION, SWT.ICON_QUESTION, SWT.ICON_WARNING}; static String[] ImageNames = new String[] {"ERROR", "INFORMATION", "QUESTION", "WARNING"}; public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("TableItem Image Names"); final Table table = new Table(shell, SWT.BORDER); table.setHeaderVisible(true); TableColumn imageColumn = new TableColumn(table, SWT.NONE); imageColumn.setText("Image"); TableColumn imageIdColumn = new TableColumn(table, SWT.NONE); imageIdColumn.setText("Image ID"); for (int i = 0; i < Images.length; i++) { TableItem item = new TableItem(table, SWT.NONE); item.setImage(0, display.getSystemImage(Images[i])); item.setText(1, "Image 0x" + Images[i]); item.setData("AccessibleName", ImageNames[i]); } imageColumn.pack(); imageIdColumn.pack(); table.getAccessible().addAccessibleListener(new AccessibleAdapter() { public void getName(AccessibleEvent e) { int i = e.childID; if (0 <= i && i < Images.length) { TableItem item = table.getItem(i); e.result = (String)item.getData("AccessibleName"); } } }); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } } Perhaps step 2 (hooking the accessible listener so that the table item has an accessible name) might be something that JFace should do for free? Eclipse UI, what do you think? This would be along the lines of making the accessible name of an image tool item available for free (as mentioned in bug 385552). If you decide not to do this, please close this bug as "works for me", because the user should be able to reach into the TableViewer and get the Table and come up with a solution by hooking the accessible listener themselves.
Thanks for looking into the issue. Is it possible to fix the problem from Eclipse base side so that we consumer do not need to modify the codes in a lot of places? Thanks!
Are you already using the org.eclipse.jface.viewers.TableViewerFocusCellManager with a TableViewer? PW
Hi, We currently have not used the org.eclipse.jface.viewers.TableViewerFocusCellManager with a TableViewer.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.