Bug 128436 - Tree with gray state does not report state to Accessible listeners
Summary: Tree with gray state does not report state to Accessible listeners
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2006-02-17 11:33 EST by Missing name CLA
Modified: 2008-04-25 12:59 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2006-02-17 11:33:58 EST
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
Comment 1 Tod Creasey CLA 2006-03-02 13:41:26 EST
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();
	}
}
Comment 2 Carolyn MacLeod CLA 2006-04-03 17:58:58 EDT
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.
Comment 3 Karice McIntyre CLA 2006-12-04 09:43:46 EST
Carolyn, what is the status/target of this bug?
Comment 4 Carolyn MacLeod CLA 2008-04-09 15:40:52 EDT
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.
Comment 5 Carolyn MacLeod CLA 2008-04-09 16:16:56 EDT
FYI, I verified that checkbox controls (i.e. Button with style SWT.CHECK) already do report "mixed" state when they are grayed.
Comment 6 Carolyn MacLeod CLA 2008-04-09 16:44:12 EDT
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