RFR: 8271846 a11y API lacks setSelectedIndex method

Artem Semenov asemenov at openjdk.java.net
Fri May 6 16:54:08 UTC 2022


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".

-------------

Commit messages:
 - [whitespace fix
 -         8271846 a11y API lacks setSelectedIndex method

Changes: https://git.openjdk.java.net/jdk/pull/8578/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8578&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8271846
  Stats: 663 lines in 4 files changed: 643 ins; 14 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8578.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8578/head:pull/8578

PR: https://git.openjdk.java.net/jdk/pull/8578



More information about the client-libs-dev mailing list