Stephen Swensen
Stephen Swensen

Reputation: 22297

Improving Swing Window Accessibility

I have a single Swing JFrame which contains a couple JLabels, a few read-only JEditorPanes, and a couple buttons. JAWS users are requesting that the application be read with less user interaction required. Right now, the application starts with a certain element in focus, and the user has to press tab to move focus and continue to the next element. Whereas with a web page, for example, JAWS will just go through and read everything without requiring the user to press tab. Especially annoying for our JAWS users, the read-only JEditorPanes only read one line of text at a time requiring the user to press the up and down arrow keys to move between them.

How can I make this JFrame be read to JAWS version 9 users more fluently?

Upvotes: 2

Views: 656

Answers (1)

Jared
Jared

Reputation: 39877

You may be able to do this but it would require using the Jaws COM api that isn't really supported. Jaws interacts with desktop applications in a much different manner then with websites. Jaws renders web pages into a virtual buffer and does all kinds of magic to make them easier to use. Jaws doesn't do this for desktop applications. I assume part of the reason it doesn't do this is desktop applications don't have all the information available to create an alternative presentation mode that is available with HTML. For what ever it's worth even utilities included with Jaws don't automatically have there read only edit fields spoken. Saying all that if you really need to do this your best bet would probably be to speak the contents of read only edit fields through the jaws api when the user gives them focus. This would require using COM from with in your Java application to access the api. I know there are java libraries that will allow you to use COM in some form but I've never done this. You can find a copy of the api in your standard Jaws installation directory, in my case it's

c:\program files\Freedom Scientific\jaws\jfwapi.dll

You'll have to use your favorite application for looking at COM libraries to determine what methods are available since there's no official documentation that I can find. You may also want to take a look at the following code sample, it's in AutoIt but gives a general idea of how to speak text using multiple screen readers. http://www.scribd.com/doc/19371/speak-with-autoit

Upvotes: 1

Related Questions