简体   繁体   中英

Java Swing JEditorPane and Screen Readers

I've been looking for the last few days and can't find an answer anywhere. I'm trying to make an accessible IDE in Java Swing. The only thing I'm having problems with, is emulating behavior that happens in other text text editors.

I want the screen reader (JAWS, in particular) to read whatever is in the selected line of the text area (not like highlighted, just wherever the cursor is - that whole line).

If I try this in Eclipse, or even notepad, whenever I use the arrow keys to move the text cursor, the screen reader immediately reads whatever is on that line. It does not do this in my program, which I've even tried to simplify down to a simple JFrame with a JEditorPane(tried a simple JTextArea as well).

Is there a particular listener, or something I have to implement accessibility-wise, or idk what else, in order to create this functionality? I apologize if my question is confusing. I'm still trying to learn how to actually make the accessibility stuff work. If there's anything else I can clarify please let me know.

Have you looked into using the Java Access bridge (download and install it), as this is necessary for screen readers like JAWS to read java applications. Java access bridge info can be found here. http://www.oracle.com/tec.network/java/javase/tech/index-jsp-136191.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM