Bug 25740 - Accessibility:SWT Label cannot be read by JAWS
Summary: Accessibility:SWT Label cannot be read by JAWS
Status: RESOLVED DUPLICATE of bug 21771
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2002-11-05 14:31 EST by Diana Lau CLA
Modified: 2003-12-08 13:44 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diana Lau CLA 2002-11-05 14:31:06 EST
SWT Label cannot be read by JAWS.

I tried to add a AccessibleListener and AccessibleControlListener to the label,
but it still did not work.  Here is the code snippet I used:
imageLabel.getAccessible().addAccessibleListener(new AccessibleListener(){
		public void getName(AccessibleEvent e) {
			e.result = "Hello";
		}
		public void getDescription(AccessibleEvent e) {
			e.result = "Hello";
		}
		public void getHelp(AccessibleEvent e) {}
		public void getKeyboardShortcut(AccessibleEvent e) {}
	});

	imageLabel.getAccessible().addAccessibleControlListener( new 
AccessibleControlAdapter() {
                  public void getRole(AccessibleControlEvent e) {
			e.detail = ACC.ROLE_PUSHBUTTON;
		}
		public void getValue(AccessibleControlEvent e) {
			e.result = "aaa";
		}
		public void getFocus(AccessibleControlEvent e) {
			e.childID = ACC.CHILDID_SELF;
		}
	});

After having this code, the values shown in the inspect tool (Inspect32.exe 
from WIndows) are correct:
Name: "Hello"
Value: "aaa"
Comment 1 Veronika Irvine CLA 2003-10-16 09:21:42 EDT
Grant, can you try this on WIndowEyes?
Comment 2 Grant Gayed CLA 2003-10-16 10:58:18 EDT
This seems like the Label equivalent of bug 21771.  WindowEyes reads out the 
label's text, and doesn't ask our AccessibleListener and 
AccessibleControlListener for their responses.

As a side note, though it's not really relevant, the initial snippet should not 
be answering ROLE_PUSHBUTTON for its role.
Comment 3 Carolyn MacLeod CLA 2003-12-08 13:44:27 EST
This is the same problem as for bug #21771 about buttons. I am working with 
the Window-Eyes people on a (simple) partial fix for graphic labels, but the 
full fix is a feature request for them. The label problem is slightly 
different from the button problem, in that buttons will take focus and labels 
don't, but it's basically the same problem, namely "that's not how Window-Eyes 
works... it just uses the GetWindowText if there is one, and does not ask for 
the accName if it can read the text that is actually displayed".

If anyone has any examples of WHY one would want to override the visible label 
of a label so that it says something else, please let me know, because an 
example would help me in my discussions with the Window-Eyes people.

I am marking this bug as a duplicate of 21771.

*** This bug has been marked as a duplicate of 21771 ***