Project: SWT
Bug 228282 [Accessibility] Table & Tree with no column headers say "sort button" on Leopard
Reported: 2008-04-22 16:54:39 | Status: resolved fixed

Run ControlExample and go to Table tab. Start VoiceOver (command+F5). Tab into the Table, and type down arrow to select the first row. VoiceOver says "sort button" before saying the contents of every cell. This would be pretty annoying and confusing to a VoiceOver user. To see what is happening, select "Column Headers". Now, the column headers each have a name. Type down arrow to select the next row. Now, VoiceOver says each table header before it says the cell contents, and it sounds correct. So the problem must be that the column headers exist - with no text - even when the columns are not visible, and VoiceOver says their description (sort button) because they have no name. Hide the column headers by deselecting "Column Headers" and type down arrow one more time. Now, the column header names that were visible are being spoken, instead of "sort button". Verified that this is a problem even in a minimal snippet. import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; public class TableTest { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("Table"); Table table = new Table(shell, SWT.MULTI | SWT.FULL_SELECTION); table.setLayoutData(new GridData(GridData.FILL_BOTH)); // table.setHeaderVisible(true); for (int col = 0; col < 3; col++) { TableColumn column = new TableColumn(table, SWT.NONE); // column.setText("Column " + col); column.setWidth(100); } for (int row = 0; row < 5; row++) { TableItem item = new TableItem(table, SWT.NONE); for (int col = 0; col < 3; col++) { item.setText(col, "item" + col + row); } } shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java