On Tue, 1 Dec 2020 22:49:08 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:
> Creating a native peer for pushbutton accessibility role on Max OS X. > The process of choosing of what peer to initialize is clunky so > might be addressed in the future. Maybe it is better to change the used file hierarchy? So all new native a11y could be placed in a separate folder and each peer in a separate file? It will be hard to understand the code if will have old and new implementation just in one file for all peers, actually, even now it is hard to view this file containing all old code. src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m line 1979: > 1977: * Implementation of the NSAccessibilityButton protocol > 1978: */ > 1979: @implementation ButtonAccessibility Do not we need to remove the old `perform()`? src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m line 1990: > 1988: > 1989: JNIEnv* env = [ThreadUtilities getJNIEnv]; > 1990: JNFCallStaticVoidMethod(env, jm_doAccessibleAction, [self > axContextWithEnv:(env)], 0, fComponent); Are you sure that the `jm_doAccessibleAction` is always initialized here? ------------- PR: https://git.openjdk.java.net/jdk/pull/1549