On Tue, 4 Mar 2025 05:27:42 GMT, Abhishek Kumar <[email protected]> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 127:
>>
>>> 125: AccessibleContext thisAC =
>>> accessible.getAccessibleContext();
>>> 126: Accessible parentAccessible =
>>> thisAC.getAccessibleParent();
>>> 127: if (!(parentAccessible instanceof
>>> JSpinner.NumberEditor)) {
>>
>> Why do you need all this if the spinner has an accessible role?
>> ```jdk-21.0.6+7/src/java.desktop/share/classes/javax/swing/JSpinner.java```
>>
>> public AccessibleRole getAccessibleRole() {
>> return AccessibleRole.SPIN_BOX;
>> }
>>
>> Also, there is already getting an a11y parent lower in the code.
>
> Native spinner and Java spinner is not a similar UI component and the issue
> lies in the text component of JSpinner. I don't find any probable solution in
> native side implementation of spin box.
>
> This seems a simple workaround fix for the issue right now.
I like this solution, I just ask you to consider replacing the ```instance
of``` check with a role comparison…
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23841#discussion_r1978668563