Better detection of spelling errors when typing in MS Word with UIA#12925
Merged
Conversation
… to give the app longer to detect the spelling error itself.
LeonarddeR
approved these changes
Oct 12, 2021
seanbudd
approved these changes
Oct 12, 2021
Merged
5 tasks
|
With nvda_snapshot_alpha-23940,c6aa7712 errors are reported with the buzz generally reliably if check spelling when writing is checked. The buzz does not happen if the word is followed by punctuation but reviewing reports the misspelling. |
michaelDCurran
added a commit
that referenced
this pull request
Oct 13, 2021
…any exception not just RuntimeError as a lot of complex things could go wrong if the underlying object disappears for instance. (#12931) Fixes #12930 Fixup of #12925 Summary of the issue: When fetching the formatting of the last typed word after a delay, in order to detect if there is a spelling error, errors can occur if the underlying object dies or is replaced. Description of how this pull request fixes the issue: Catch Exception rather than RuntimeError when fetching formatting by calling GetTextWithFields. Note that this exception will still be logged at debug warning.
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 #12161
Summary of the issue:
When in any editable text control (E.g. a Word document), each time the user completes a word by typing space or another punctuation character, NVDA checks the formatting of the completed word to see if it is marked as a spelling error, and if so plays a special text error buzz sound.
However, in at least MS Word with UIA, this check for spelling errors never really finds an error as MS Word has not yet actually detected the error itself.
We need to slow down NVDA's detection to give the app more time.
Description of how this pull request fixes the issue:
Delay the fetch and check of the completed word's formatting into a future core cycle (specifically a 50 ms delay) to give the app more time to detect the error itself.
Testing strategy:
In MS Word with UIA enabled/disabled, and Mozilla Thunderbird:
Created a new document or message, and started typing text with errors. Ensured that NVDA played the spelling error sound when the completed word had an error.
This test was performed both on a plugged in machine on a high-performance power profile, and a machine on battery, on a power saver profile.
All scenarios played the spelling error sound at the appropriate time.
Known issues with pull request:
None known.
Change log entries:
New features
Changes
Bug fixes
NVDA more accurately detects spelling errors as you type in MS Word with UIA enabled. (#12161)
For Developers
Code Review Checklist: