On Mon, 21 Nov 2022 10:44:43 GMT, Artem Semenov <[email protected]> wrote:
>> It is unclear why the `setSelectionInterval `is actually any better than
>> `addAccessibleSelection`. Both have a similar implementation, in some
>> cases, the addSelectionInterval just calls setSelectionInterval, and seems
>> that posts similar notifications. So it is unclear why the
>> setSelectionInterval works fine and addAccessibleSelection does not work.
>
> I tried calling clearSelection again instead of adding an interface:
>
> if (as == null) return;
> if (pac.getAccessibleRole().equals(AccessibleRole.LIST)) {
> as.clearAccessibleSelection();
> }
> as.addAccessibleSelection(i);
>
> After that I changed the call to
> ```javax.swing.JList.AccessibleJList#addAccessibleSelection```
>
> JList.this.addSelectionInterval(i, i);
>
> on the
>
> JList.this.getSelectionModel().setSelectionInterval(i, i);
>
> Nothing changed. VoiceOVer still freezes.
> I think that the problem is not that setting the selection doesn't work, but
> that clearing the selection before setting causes the VO to fris.
Some probably related points, the implementation of the addAccessibleSelection
for the JComboBox. is the same:
clearAccessibleSelection();
JComboBox.this.setSelectedIndex(i);
It is possible that it also hangs?
-------------
PR: https://git.openjdk.org/jdk/pull/8578