RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v3]
Abhishek Kumar
abhiscxk at openjdk.org
Tue Jul 4 14:54:59 UTC 2023
On Tue, 4 Jul 2023 14:17:51 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> It means you have to look into how it's done in JList so that JCheckBox works in a similar way.
For a JList, whenever `setText` is invoked from renderer's `getListCellRendererComponent` method, JLabel's text is set to the value displayed in JList. So, a11y API invokes the `getAccessibleName` method for `AccessibleJLabel` and that returns the correct string.
But in case of JComboBox, a11y API invokes the `getAccessibleName` method for `AccessibleJButton` and that returns an empty string.
To fix this we need to get the current displayed text is JComboBox as the other way around is not correct for custom renderer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1252133130
More information about the client-libs-dev
mailing list