Integrated: 8339728 : [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class

Abhishek Kumar abhiscxk at openjdk.org
Thu Jan 9 04:14:46 UTC 2025


On Thu, 19 Dec 2024 05:17:07 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

> For a JMenuItem with a shortcut like _Ctrl + Comma_, the `getKeyChar` method of the `AccessBridge` class cuts the _Comma_ text to the first character and hence transfers `C (instead of Comma)` via the `AccessBridge` API. For a shortcut _Ctrl + Comma_ in a menu item, screen readers announce _Ctrl + C_ instead of _Ctrl + Comma_ as shortcut. Same issue exists for **Enter, Period and other keys** as well where only the first character is returned from the getKeyChar method. 
> 
> Proposed fix is to ensure that the _char representation of the shortcuts_ is returned by the `getKeyChar` method and it worked fine except for **"Enter"** key. It is unclear to me why it has not announced by AT (JAWS) but I think that may be due to the char representation of the Enter key which is a Line Feed.
> 
> AT was also not able to announce the _Tab and Space_ key as a shortcut. Adding these keys in the control key list in _AccessBridge_ and in supported control code list in _AccessBridgePackages_ files enabled them to be announced by AT.
> 
> Manual test case is added to verify the shortcut for JMenuItems.

This pull request has now been integrated.

Changeset: a46ae703
Author:    Abhishek Kumar <abhiscxk at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a46ae7031e30eb4940e43012a42f1b7fa5d942ef
Stats:     127 lines in 3 files changed: 116 ins; 5 del; 6 mod

8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class

Reviewed-by: aivanov, psadhukhan, kizune

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

PR: https://git.openjdk.org/jdk/pull/22822


More information about the client-libs-dev mailing list