On Mon, 19 Jun 2023 08:41:48 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line >> 162: >> >>> 160: AccessibleContext ac = this.getAccessibleContext(); >>> 161: if (ac != null && (comboBox.getSelectedItem() != null)) { >>> 162: >>> ac.setAccessibleName(comboBox.getSelectedItem().toString()); >> >> Why are you using the currently selected element for the button name and not >> a specific name? Whether it will sound right when using a screen reader. >> Wouldn't this be misleading to a blind user? Especially since it will only >> change when this method is called. > >> Why are you using the currently selected element for the button name and not >> a specific name? > > As it is required to show the magnified text for the selected item in > JComboBox. Setting it to some specific name always results into that name > irrespective of selected item in JCombobox. > >> Whether it will sound right when using a screen reader. Wouldn't this be >> misleading to a blind user? > > I checked with VO announcement with or without this chunk of code, it is same > in both case. > >> Especially since it will only change when this method is called. > > This method is called whenever the current selection is changed so accessible > name is set to correct item. JSON with enumeration of fields is also a text description of the object. But if you checked that there is no garbage, then good. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1238924746