Community
Participate
Working Groups
The CheckboxTreeViewer and CheckboxTableViewer do not report partial selection status (grayed) to Accessible object. When a TableItem or TreeItem is in a grayed checked state screen readers report it as selected not gray selected or partially selected
Here is an SWT only version of the same problem using SWT Snippet 13. If you look at the tree item in inspect32 you will also see that there no difference between it and the white version of it. import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: IBM Corporation - initial API and implementation ******************************************************************************/ /* * Tree example snippet: create a tree * * For a list of all SWT example snippets see * http://www.eclipse.org/swt/snippets/ */ public class Snippet15 { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); final Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK); tree.setSize(200, 200); shell.setSize(200, 200); for (int i = 0; i < 4; i++) { final TreeItem iItem = new TreeItem(tree, 0); iItem.setText("TreeItem (0) -" + i); for (int j = 0; j < 4; j++) { TreeItem jItem = new TreeItem(iItem, 0); jItem.setText("TreeItem (1) -" + j); for (int k = 0; k < 4; k++) { final TreeItem kItem = new TreeItem(jItem, 0); kItem.setText("TreeItem (2) -" + k); for (int l = 0; l < 4; l++) { TreeItem lItem = new TreeItem(kItem, 0); lItem.setText("TreeItem (3) -" + l); } } } } tree.addListener(SWT.Selection, new Listener(){ public void handleEvent(Event event) { if(event.item != null) ((TreeItem) event.item).setGrayed(true); } }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
This would have to be a new feature, and we are now past the "API freeze" milestone (M5), therefore this will not be in eclipse 3.2. Looking at the MSAA spec, I see that Windows reports this state for a checkbox as "mixed". See http://msdn.microsoft.com/library/en-us/msaa/msaapndx_4erc.asp (look at get_accState). Not sure what the other platforms report this state as. After eclipse 3.2 ships, we will be looking at which accessibility features we can add to the next version of eclipse.
Carolyn, what is the status/target of this bug?
Fixed > 20080409. Tree and Table now report their state as "mixed" to accessible tools if the focus item is grayed when the tool asks for its state.
FYI, I verified that checkbox controls (i.e. Button with style SWT.CHECK) already do report "mixed" state when they are grayed.
To clarify, when a Tree item, Table item, or Button has SWT.CHECK style, it will report its accessible state as follows: - if it is checked: checked - if it is not checked: nothing - it it is grayed and checked: mixed - if it is grayed and not checked: nothing