Community
Participate
Working Groups
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"
Grant, can you try this on WIndowEyes?
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.
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 ***