On Sat, 8 Apr 2023 14:16:57 GMT, Kevin Rushforth <[email protected]> wrote:
>> Add the common base component for all the new implementing native classes
>> Change native peer creation to use the new base component The new code will
>> instantiate new protocol implementation for the given role if it exists or
>> an old one if it does not exist
>> Added BUTTON role implementing class
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java
> line 807:
>
>> 805: if (this.peer == 0L) {
>> 806: AccessibleRole role = (AccessibleRole) getAttribute(ROLE);
>> 807: if (role == null) role = AccessibleRole.NODE;
>
> When would `role` be null? And if it is, is defaulting to `NODE` going to do
> the right thing once you implement the new a11y protocol for Node?
It can be when customer creates a custom component that does not provide
accessible attributes. With the new API that will be covered by the default
implementation that will report some generic role.
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java
> line 976:
>
>> 974: return -1;
>> 975: }
>> 976:
>
> This method is not used anywhere (even from native code).
Yes, that was added as one of the ways to provide role to the initialization
but i ended up by passing role as a string at the initialization phase so this
method has to be removed.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1084#discussion_r1161988092
PR Review Comment: https://git.openjdk.org/jfx/pull/1084#discussion_r1161989719