Comment 8 for bug 2016194

Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

In order to enable accessibility bridge before the patch removal, the property file had to be edited (or .accessibility_properties created in the user's home).
This was the assumption that the launcher of the desktop application or user's CLASSPATH environment variable could be also modified to include accessibility classes.

Java 9 and up requires to extend AccessibilityProvider class[1] though it still contains a fallback to just load the classes:
----------
            names.stream()
                 .filter(n -> !providers.containsKey(n))
                 .forEach(Toolkit::fallbackToLoadClassForAT);
----------
Since I've seen that the provider is built for Java 8 and not the higher versions it has also contributed to the assumption. The oracle bug is closed upstream for this reason[2].

Going forward we could update the accessibility provider to the new API and bake it into the runtime image via jlink step when we build the openjdk-jre-headless package. We should probably keep the properties file disabled and advice to enable accessibility via .accessibility.properties in the user's home. This is the approach that is being used by the Oracle build of JDK. We could also provide an utility similiar to `jabswitch` to enable accessibility.

[1] https://docs.oracle.com/javase/10/docs/api/javax/accessibility/AccessibilityProvider.html
[2] https://bugs.openjdk.org/browse/JDK-8204862