RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v5]
Alexey Ivanov
aivanov at openjdk.org
Mon Jul 24 19:28:56 UTC 2023
On Fri, 21 Jul 2023 19:32:07 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java line 242:
>>
>>> 240: ac.setAccessibleName(label.getText());
>>> 241: }
>>> 242: }
>>
>> How it will work in other L&Fs?
>
> In case of other LAFs except **Aqua** in MacOS, the accessible component invoked for screen magnifier is an instance of `AccessibleJComboBox` and subsequently the a11y API called on `AccessibleJComboBox` to return the accessible name.
>
> But for aqua, the accessible component invoked for screen magnifier is an instance for `AquaComboBoxButton`, so it is required to return the accessible button instance for a11y APIs to get called for retrieving accessible name.
That's exactly my concern: in other L&Fs `AccessibleJComboBox` handles the scenario yet in Aqua L&F it is handled by a different component which is not a problem okay per se. What is a problem is that retrieving the accessible name depends on paint:
* if `AquaComboBoxButton.paint` hasn't been called for whatever reason, there's no accessible name;
* if the value in the combo box is changed, the accessible name isn't updated until paint occurs.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1272656451
More information about the client-libs-dev
mailing list