On Fri, 7 Feb 2025 08:14:51 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:
>>> For consistency, it can be done. I need to check if it impacts on VO >>> announcement. >> >> It shouldn't impact the announcements. One button gets deselected, another >> one gets selected… >> >> Yet now that I think about it more, we may want to skip announcing >> deselecting a button in the group when selection moves to another button. >> >> What about the case where currently focused or unfocused selected button >> gets deselected programmatically? Is there an interactive way to deselect a >> radio button when it's the only button in its own group? >> >> This *needs more testing*. > > @aivanov-jdk I think we should not change RadioButton's implementation as the > announcement is not consistent. > Do you have any other suggestion ? @kumarabhi006 Sorry the long delay. I tested the behaviour of radio buttons and I can't see or hear any difference in announcements when the same condition, namely `!Objects.equals(newValue, oldValue)`, is used before calling `valueChanged(ptr)`. I added a panel with three radio buttons to your test case. Initially all the buttons aren't selected. VoiceOver announces when I move to the first radio button. It also announces when I move between radio buttons with left and right arrows. Then when I press the <kbd>Space</kbd> key, the current radio button gets selected and this is announced by VoiceOver: selected, <the caption of the button>. When I move to another button with arrow keys, it doesn't get selected right away when VoiceOver is active, and VoiceOver announces that I moved to another button and that it's not selected. Pressing the <kbd>Space</kbd> key selects the currently active button. What do you hear when testing such a scenario? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23436#discussion_r1952921829