I'm trying to implement a very, very simple accessibility test for Swing so I can get a handle on how big a piece of work it will be to provide accessibility support for our already established Swing application.
I have the most simple Swing program, and I'm using Narrator in Windows Vista to attempt to screen-read its GUI.
public class ReadableFrame extends JFrame {
private ReadableFrame() {
super();
setTitle( "Banjollity's Window" );
setSize( 640, 580 );
setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE );
JButton button = new JButton( "Hello World" );
getContentPane().setLayout( new FlowLayout() );
getContentPane().add( button );
setVisible( true );
}
/**
* @param args
*/
public static void main( String[] args ) {
new ReadableFrame();
}
}
Narrator can read the title but nothing else. I get "Banjollity's Window, contains no other known controls". If I replace the Swing JButton with an AWT Button like so:
Button button = new Button( "Hello World" );
...then it works properly, and I get "Banjollity's Window, focus on Hello World button, contains Hello World button".
I've tried installing the Java Access Bridge to JRE/lib/ext (and I strongly suspect this is working properly as my program refused to start up my application until I put the DLLs in Windows/System32) but to no avail.
Can anybody help, or share a few suggestions?