Fix for inappropriate distance announcement when pressing shift+tab from Outlook message #11925
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 #10254
Summary of the issue:
When writing a message in MS Outlook, shift+tab may be used to go from the message body to the last header field (subject or attachments). However, NVDA report a distance before announcing the newly focused object (subject field or attachments list).
Description of how this pull request fixes the issue:
As already done for messages being read, I now check the result of the shift+tab action also in messages in edition. If no caret movement is detected, do not report anything more (indent distance, table cell change).
For this, I have created a
BaseOutlookWordDocument
that inherits fromNVDAObjects.window.winword.WordDocument
to override thescript_tab
to perform this check.Testing performed:
With a message in edition, tested that shift+tab does not report a distance if the focus jumps out of the message body in the following cases:
Tested that Tab and shift+Tab still works in tables to move from cell to cell.
When not in a table (in plain text, checked that tab still repots the indent distance.
Performed this test with UIA for Word disabled and enabled.
Known issues with pull request:
None
Change log entry:
Section: Bug fixes
In MS Outlook, inappropriate distance reporting when shift+tabbing from message body to subject field should not occur anymore. (#10254)