RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v7]

Abhishek Kumar abhiscxk at openjdk.org
Tue Sep 26 10:54:20 UTC 2023


On Fri, 1 Sep 2023 10:19:42 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Ok, I will check this.
>
>> I still do not think that setting accessible name in paint is a good idea.
> 
> It's been my biggest concern. But I didn't even think about it this way.
> 
> The problem is that the displayed value is known only when the component is painted. Other components seem to handle it… somehow.

> Setting it during the initialization and adding a property change listener to the accessible context to track changes seems like a better way to do it.

@azuev-java We have a ItemListener for JComboBox defined in AquaComboBoxUI here to handle any changes in combobox selected item.

https://github.com/openjdk/jdk/blob/9e6cb620486ac7b0adaefeb2000babf3ea31207f/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java#L135

Tried setting the `accessibleName` for arrowButton in `itemStateChanged` method. So whenever combobox value  changes using list selection, **accessibleName is set to the selected Item**.

For initial accessibleName, it can be set to the first value of data model inside `AquaComboBoxButton constructor` code.

`However, this doesn't work with custom renederer.`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1337018315


More information about the client-libs-dev mailing list