RFR: 8339728 : [Accessibility, Windows, JAWS] Bug in the getKeyChar method of the AccessBridge class [v6]
Abhishek Kumar
abhiscxk at openjdk.org
Mon Jan 6 07:09:23 UTC 2025
> 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.
Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
Instruction and missed copyright year update
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22822/files
- new: https://git.openjdk.org/jdk/pull/22822/files/64ecaf0a..705fb4c6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22822&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22822&range=04-05
Stats: 4 lines in 2 files changed: 1 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/22822.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22822/head:pull/22822
PR: https://git.openjdk.org/jdk/pull/22822
More information about the client-libs-dev
mailing list