Using JAWS with a Table widget [message #666269] |
Tue, 19 April 2011 12:35  |
Eclipse User |
|
|
|
Afternoon,
I have a Table with an associated Label in a Composite. I want JAWS to read the label when I tab into the Table widget.
Instead of the label getting read, JAWS reads "ListView". How can I override this functionality? I have tried adding every different type of accessibility listener to no avail.
I also modified snippet350 by making the appropriate calls to addRelation. After doing this if I put a breakpoint in getName() I see that e.result contains the text from the label but JAWS does not read it.
Does anyone have any idea what is going on here?
Regards,
Jon
|
|
|
Re: Using JAWS with a Table widget [message #666712 is a reply to message #666269] |
Thu, 21 April 2011 14:42   |
Eclipse User |
|
|
|
JAWS 12 will read the accessible name. JAWS 11 or earlier did not. So for example, in the following snippet, JAWS 12 will say "Accessible Name For Table" when the table gets focus, followed by "item 0 not selected" or something like that. Note that JAWS will not say the preceding label "Table Label". (Window-Eyes 7.11 reads the preceding label, so one suggestion is to use the same string for both). (NVDA, like JAWS 12, says the accessible name).
import org.eclipse.swt.*;
import org.eclipse.swt.accessibility.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class TableLabelTest {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
Label label = new Label(shell,SWT.NONE);
label.setText("Table Label");
final Table table = new Table(shell,SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
for (int i = 0; i < 20; i++) {
TableItem item1 = new TableItem(table, SWT.NULL);
item1.setText("item" + i);
}
table.getAccessible().addAccessibleListener(new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF) {
e.result = "Accessible Name For Table";
}
}
});
Text text = new Text(shell, SWT.BORDER);
text.setText("Tab here to change focus");
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
|
|
|
Re: Using JAWS with a Table widget [message #684826 is a reply to message #666712] |
Thu, 16 June 2011 05:57  |
Eclipse User |
|
|
|
Thanks for the reply.
I installed JAWS 12 and ran the snippet and the custom text is read by JAWS now which is great. However when I run my custom dialog the text is still not read which is very odd!! It still reads 'ListView'.
The only real difference I can see between the two is that my dialog has a Composite parent whereas your snippet uses the Shell but I cannot see that this will make a difference. A little more digging is required...
|
|
|
Powered by
FUDForum. Page generated in 0.08557 seconds