Scrolling braille in MS Word with a Chinese input method enabled no longer incorrectly jumps back#12868
Merged
Conversation
…ents to the currently focused object if the currently focused object is not an IAccessible (MSAA) object. Fixes #12855 as the Chinese Microsoft Quick input method when used in Microsoft Word was firing MSAA caret events on the Word document, even though the Word document was UIA.
Member
Author
|
@cary-rowen Please test the following try build and confirm that issue #12855 is fixed: |
Contributor
|
Hi Michael, I tested this build and confirmed that #12855 has been fixed. |
seanbudd
approved these changes
Sep 22, 2021
Co-authored-by: Sean Budd <sean@nvaccess.org>
LeonarddeR
reviewed
Sep 23, 2021
| return | ||
| if NVDAEvent[1] == focus: | ||
| # if the winEvent is for the object with focus, | ||
| # Ensure that that the event is send to the existing focus instance, |
5 tasks
michaelDCurran
added a commit
that referenced
this pull request
Nov 3, 2021
…ext. (#13020) Fixes #12970 Fixes #13004 Fixes regression caused by pr #12868 Summary of the issue: When accessing an MS Word document via UIA, the braille display is not updated when typing characters into the document, although it does correctly update if the caret is moved with the arrow keys and such. Generally, NVDA tells braille to update for each caret event. However, In Microsoft Word, although the caret does technically move when typing characters, Microsoft Word only fires a UIA textchange event (NVDA textChange event), and not a caret event (UIA textSelectionChanged event). Before pr #12868 , Braille did seem to update correctly, but that was because NvDA was incorrectly passing an MSAA caret event into the UIA NVDAObject with focus. Description of how this pull request fixes the issue: On the MS Word document NVDAObject, implement an event_textChange method which just instructs Braille to update.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #12855
Summary of the issue:
When in Microsoft Word, and using a Chinese input method such as Taiwan - Microsoft Quick, and NVDA is accessing Microsoft Word via UI Automation, trying to scroll forward through the document with a braille display causes the braille display to keep jumping back to the original caret position.
This is due to the fact that while the Chinese input method is enabled, legacy MSAA caret events are fired on the Word document window. NVDA is not ignoring these, even though NVDA is configured to access Microsoft word with UIA.
Description of how this pull request fixes the issue:
In IAccessibleHandler.processGenericWinEvent: if an MSAA caret event is identified, before we route this onto the focused object, we first check if the focused object is in deed IAccessible (MSAA), and if it is not (E.g. it is UIA) then we drop the event completely.
This pr also improves MSAA debug logging a little by including the winEvent info in the message about the caret being routed to the focus, and also routes generic events for the focus to the existing focus if their event object is not already the existing focus. This really only stops some extra redundant logging.
Testing strategy:
Opened the test document from #12855 in Microsoft word. Ensured that NVDA was accessing Microsoft Word with UIA (check defInfo in the log viewer).
Installed the Taiwan - Microsoft Quick input method in Windows language settings.
Switched to the Taiwan - Microsoft quick input method when focused in the word document, by pressing alt+shift 1 or more times until Taiwan - Microsoft Quick is selected.
Press scroll forward on the braille display multiple times, ensuring that the display is showing the correct line and is not jumping back to where the caret was originally positioned.
Also tested that MSAA caret events were still being routed to the focus in an MSAA-based window, such as the Scintilla control in Notepad++. Checked the log viewer with MsAA debug logging enabed to see that the caret events were being routed.
Ensured that generic MSAA events such as stateChange for the focused object are still being routed to the existing focus: Open the NvDA general settings, and tab to one of the checkboxes and press space, ensuring that NVDA reports "checked" if the checkbox was previously unchecked.
Known issues with pull request:
None known.
Change log entries:
Bug fixes
Code Review Checklist: