On Sun, 20 Nov 2022 03:16:28 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> It looks like it is. Please formulate the question differently.
>
> 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.
The problem is not that setting the selection doesn't work, but that clearing 
the selection before setting causes the VO to fris.

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

PR: https://git.openjdk.org/jdk/pull/8578

Reply via email to