Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Using JAWS with a Table widget(How do I override the standard "ListView" text when the Table gets focus?)
Using JAWS with a Table widget [message #666269] Tue, 19 April 2011 16:35 Go to next message
jon.wollny is currently offline jon.wollnyFriend
Messages: 3
Registered: April 2011
Junior Member
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 18:42 Go to previous messageGo to next message
Carolyn MacLeod is currently offline Carolyn MacLeodFriend
Messages: 149
Registered: July 2009
Senior Member
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 09:57 Go to previous message
jon.wollny is currently offline jon.wollnyFriend
Messages: 3
Registered: April 2011
Junior Member
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...



Previous Topic:Highlighting text in a Browser?
Next Topic:Listing files in folder using webkit browser
Goto Forum:
  


Current Time: Fri Apr 19 05:21:27 GMT 2024

Powered by FUDForum. Page generated in 0.01932 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top