Skip to content

Windows 11/modern keyboard: handle hardware keyboard input suggestions announcements again#16313

Merged
michaelDCurran merged 5 commits into
nvaccess:masterfrom
josephsl:i16283
Apr 1, 2024
Merged

Windows 11/modern keyboard: handle hardware keyboard input suggestions announcements again#16313
michaelDCurran merged 5 commits into
nvaccess:masterfrom
josephsl:i16283

Conversation

@josephsl

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #16283

Summary of the issue:

In Windows 11, NVDA does not announce top suggestion from hardware keyboard input suggestions list.

Description of user facing changes

NVDA will once again announce hardware keyboard input suggestions.

Description of development approach

Edited IMECandidateUI/IMECandidateItem classes in emoji panel app module:

  • IMECandidateUI: in Windows 11, NVDA will descend one more level if Automation Id is "IME_Prediction_Window".
  • IMECandidateItem: NVDA will handle UIA element selected event as long as focus is not on the candidate item itself (refined from previous iteratino of this class).

Testing strategy:

Manual testing:

  1. Enable hardware keyboard input suggestions in Windows 11.
  2. Type text (preferably in English).
  3. Observe that NVDA announces top input suggestion.

Known issues with pull request:

NVDA may announce CJK IME elements when IME window is opened the first time after starting NVDA, and NVDA does not announce CJK IME candidates in subseqent window open event from IME window. This is due to a focus entered event coming from IME candidate UI element, which should be addressed in a different issue/PR combination (UIA Automation Id's are different).

Code Review Checklist:

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

@josephsl josephsl requested a review from a team as a code owner March 15, 2024 20:16
@josephsl josephsl requested a review from gerald-hartig March 15, 2024 20:16
@josephsl

josephsl commented Mar 30, 2024

Copy link
Copy Markdown
Contributor Author

Hi,

Note: this PR makes first part of UIA element selected event handler in emoji panel app module redundant - effectively the IME candidate window Automation Id check becomes dead code, and I'll remove it in the next commit (please hold on). Also, in IME candidate item class, moving Windows 11 and focus check to the end of the element selected event handler method will allow NVDA to announce visible IME candidates when changing IME pages, but I'm deferring it for a while to test it a bit more.

Thanks.

Joseph Lee and others added 4 commits March 30, 2024 13:34
…l when handling show event from IME candidate UI if Automation Id is 'IME_Prediction'Window'. Re nvaccess#16283.

When show event is handled in candidate UI, descend one more level if UIA Automation Id is 'IME_PredictionWindow' a.k.a. hardware keyboard input suggestions. This allows hardware keyboard input suggestions item in Windows 11 to handle element selected event (with some refinements).
…t focused on candidate UI. Re nvaccess#16283.

Windows 11 hardware keyboard input suggestions: announce top suggestion if keyboard input suggestion is enabled just as it does in Windows 10. This is done by refining UIA element selected event in IME candidate item class - instead of vetoing it in Windows 11, it will be vetoed if gain focus event is pending/parent element is candidates list.
… Id check as it is now dead code. Re nvaccess#16283.

Now that IME candidate UI knows where candidate items are in Windows 11, there is no need to do redundant checks in app module version of element selected event handler, making it dead code (and thus removed).
@michaelDCurran michaelDCurran merged commit 0a55ad2 into nvaccess:master Apr 1, 2024
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Apr 1, 2024
@josephsl josephsl deleted the i16283 branch April 6, 2024 18:52
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/hardware input suggestions and IME: NVDA does not announce top hardware keyboard input suggestions or candidates when IME window opens

3 participants