RFR: 8271846 a11y API lacks setSelectedIndex method
Phil Race
prr at openjdk.java.net
Fri May 6 17:17:03 UTC 2022
On Fri, 6 May 2022 16:10:35 GMT, Artem Semenov <asemenov at openjdk.org> wrote:
> A11Y implementation on macOS has to directly call the 'JList.setSelectedIndex' method in order to request selection on an item (see 'CAccessibility.requestSelection'). The reason is that a11y API lacks appropriate method.There's only 'javax.accessibility.AccessibleSelection#addAccessibleSelection' which is mapped to 'javax.swing.JList#addSelectionInterval', it can not be used to set selected index.
>
> @forantar @azuev-java @mrserb please review.
>
> Please note that the new API allows you to implement a multiple selection in lists from the Java side, but I did not succeed in implementing it, because I could not determine the inclusion of the so-called "VoiceOver multiple selection mode".
Since you are propsosing new API, you can't backport this. I hope that is understood.
src/java.desktop/share/classes/javax/accessibility/AccessibleList.java line 27:
> 25: * This interface provides list specific data.
> 26: *
> 27: * @author Artem Semenov
We don't do @author tags in openjdk
test/jdk/java/awt/a11y/AccessibleListTest.java line 3:
> 1: /*
> 2: * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
> 3: * Copyright (c) 2021, JetBrains s.r.o.. All rights reserved.
Not 2022 ?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8578
More information about the client-libs-dev
mailing list