Skip to content

Windows 11/input experience window: recognize IME interface#14836

Merged
seanbudd merged 7 commits into
nvaccess:masterfrom
josephsl:i14509win11IMEInterface
Apr 18, 2023
Merged

Windows 11/input experience window: recognize IME interface#14836
seanbudd merged 7 commits into
nvaccess:masterfrom
josephsl:i14509win11IMEInterface

Conversation

@josephsl

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #14509

Summary of the issue:

NVDA does not recognize Windows 11 IME interface, or if it does, announces candidate items multiple times.

Description of user facing changes

NVDA will recognize and announce Windows 11 IME candidate items used when entering text in languages such as Chinese, Japanese, Korean, and other languages through use of input method editors (IME).

Description of development approach

Three changes to modern keyboard app module:

  1. Recognize IME candidate UI and candidate items found in Windows 11.
  2. Unlike Windows 10, Windows 11 adds an extra element to IME candidate window, therefore descend one more level when locating IME candidate items in app module version of UIA element selected event handler.
  3. Veto UIA element selected event for IME candidate item in Windows 11 until a solution that allows focus and element selected events to cooperate when announcing IME candidate items.

For the third change, feedback from people speaking and typing Chinese, Japanese, and Korean would be helpful (this PR was based on Korean nput but could be expanded to cover Chinese, Japanese, and perhaps other languages in the future, either part of this pull request (unlikely) or in future PR's).

Testing strategy:

Manual testing (prerequisite: CJK input method editors must be instaled):

On Windows 11, install IME for languages such as Chinse, Japanese, or Korean. Then open a text field such as Notepad document, switch input language to one of these languages (Windows+Space), then:

  1. Without the PR installed, type something in one of the new languages. Notice that NVDA may not recognize IME candidates, or if it does, only focus event is fired.
  2. Repeat item 1 but with the PR applied.

Known issues with pull request:

Feedback from speakers of various languages and users of IME's would be helpful in refining this PR as this implementation is limited to CJK IME at this time.

Change log entries:

If adopted and tested after receiving feedback:

Bug fixes:

Under Windows 11 fixes section:
NVDA will once again announce candidate items when entering text in languages such as Chinese and Japanese. (#14509)

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

Additional context:

This PR comes from code found in Windows App Essentials add-on, with the fixed described included in the add-on since late 2021.

… Re nvaccess#14509.

Windows 11 IME candiate's parent window has AutomationId of 'TEMPLATE_PART_CandidatePanel' and items underneath it wil be reocnigzed as IME candidate items.
…access#14509.

If UI Automation Id is 'TEMPLATE_PART_CandidatePanel' or 'IME_Prediction_Window' and role is either a list or a pop-up menu, reocgnize this as Windows 11 IME user interface.
…s 11.

Windows 11 raises focus event when IME candidate receives system focus, and without turning off element selected event, it will result in NVDA announcing candidate items twice. Therefore return early if IME candidate item raises element selected event while running Windows 11.
…ate item in Windows 11.

Unlike Windows 10, Windows 11 IME window adds an extra element when descending IME window hierarchy, therefore descend one more level to handle IME candidate item and UIA eement selected event coming from it.
@josephsl josephsl requested a review from a team as a code owner April 16, 2023 01:00
@josephsl josephsl requested a review from seanbudd April 16, 2023 01:00
@josephsl josephsl changed the title Windows 11/input expeirence window: recognize IME interface Windows 11/input experience window: recognize IME interface Apr 16, 2023
@Adriani90

Copy link
Copy Markdown
Collaborator

cc: @cary-rowen

@cary-rowen

Copy link
Copy Markdown
Contributor

I tested this and it looks good so far, I'll keep an eye on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows 11 modern keyboard: recognize IME candidates window and items

5 participants