Please review the following patch. Bug: https://bugs.openjdk.java.net/browse/JDK-8076554 Patch: http://cr.openjdk.java.net/~ptbrunet/JDK-8076554/webrev.02/
The problem is that the code is currently hardcoded to only support text accessibility for JTextComponent using the DocumentListener, CaretListener interfaces. This eliminates the ability to provide accessibility for a custom text components. The resolution is to remove the JTextComponent gate and use the PropertyChangeListener listener interface with its ACCESSIBLE_CARET_PROPERTY and ACCESSIBLE_TEXT_PROPERTY properties. I tested this with the two test cases which can be found at http://cr.openjdk.java.net/~ptbrunet/JDK-8076554/test/ running them side by side with VoiceOver. Note that I will fix the similar JProgressBar and JSlider restrictions in JDK-8154507 and JDK-8154508 respectively. Pete