RFR: 8341311: [Accessibility, macOS, VoiceOver] VoiceOver announces incorrect number of items in submenu of JPopupMenu [v2]
Abhishek Kumar
abhiscxk at openjdk.org
Thu May 29 06:35:51 UTC 2025
On Wed, 28 May 2025 15:01:47 GMT, Artem Semenov <asemenov at openjdk.org> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Minor update
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java line 877:
>
>> 875: if (ac != null) {
>> 876: Accessible aComp = null;
>> 877: for (int i = 0; i < ac.getAccessibleChildrenCount(); i++) {
>
> I suggest replacing for with while. If the desired submenu is at the beginning of the list, there’s no need to traverse it further.
I think even though the submenu is at the beginning but if it is not visible then we need to traverse further to check for other submenu if present.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25470#discussion_r2113306623
More information about the client-libs-dev
mailing list