RFR: 8283214: [macos] Screen magnifier does not show the magnified text for JcomboBox [v2]
Alexey Ivanov
aivanov at openjdk.org
Thu Jun 29 13:46:06 UTC 2023
On Mon, 19 Jun 2023 09:27:01 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> The issue exist only for non-editable combobox and the root cause is accessible object is not created due to incorrect index returned from component class which results in no a11y API invoked.
>>
>> Proposed solution is to return the correct accessible child from getAccessibleChild method which is AquaComboBoxButton (arrowButton) instance and that results in invoking the a11y APIs to return the current selected item in combobox.
>>
>> Further when the application comes up first time the accessible name is not set for current displayed item in JCombobox that is handled in AquaComboBoxButton which will take care for the current selected item as well as if user modifies the selection by drop-down list.
>>
>> This fix results in few JCK test failure and that may require modification. I have filed an issue against JCK ([JCK-7319423](https://bugs.openjdk.org/browse/JCK-7319423)).
>>
>> CI link is posted in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comment update
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java line 1141:
> 1139: return(Accessible) popup;
> 1140: }
> 1141: break;
Why do you change indentation? To minimise the number of changed lines, please keep the existing indentation.
test/jdk/javax/accessibility/JComboBox/TestJComboBoxScreenMagnifier.java line 30:
> 28: * @build PassFailJFrame
> 29: * @requires (os.family == "mac")
> 30: * @summary Verifies if JComboBox selected itemmagnifies using
Suggestion:
* @summary Verifies if JComboBox selected item magnifies using
test/jdk/javax/accessibility/JComboBox/TestJComboBoxScreenMagnifier.java line 68:
> 66: frame.dispose();
> 67: }
> 68: });
This is redundant, `PassFailJFrame` automatically handles disposing of windows which are added using the `addTestWindow` method.
test/jdk/javax/accessibility/JComboBox/TestJComboBoxScreenMagnifier.java line 77:
> 75: "Mango", "Pine Apple", "Banana"};
> 76: JComboBox<String> comboBox = new JComboBox<String>(fruits);
> 77: JPanel fruitPanel = new JPanel(new GridLayout(1,2));
Suggestion:
JPanel fruitPanel = new JPanel(new GridLayout(1, 2));
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1246625361
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1246637228
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1246639497
PR Review Comment: https://git.openjdk.org/jdk/pull/14497#discussion_r1246639809
More information about the client-libs-dev
mailing list