UIA in MS Word: Stop announcing the next bullet on the previous line#10467
Merged
Conversation
…ing a range passed the end of the given outer range. Fix for #9613: The next bullet in MS Word is announced on the line above. # Please enter the commit message for your changes. Lines starting
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit 35f622f1a5 |
LeonarddeR
approved these changes
Nov 6, 2019
LeonarddeR
left a comment
Collaborator
There was a problem hiding this comment.
This works great for me, thanks for taking this! Just one comment
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 #9613
Summary of the issue:
When reading in MS Word 2016/365 with UIA enabled, the bullet or number of the next list item is announced when reading the previous line.
Description of how this pull request fixes the issue:
Tightned up UIAUtils.iterUIARangeByUnit to doubley make sure that we do not start emitting a chunk whos end is at or beyond the end of the requested range to split.
On MS Word list items it seems that when splitting by the Format unit, If you try to clip the end of a chunk to the end of the previous line, the bullet for the next line is still included. Yet, checking the start of the chunk can get around this as it reports being equal or passed the end already.
Certainly a bug in MS Word, but very complex as the caret itself never lands on the bullet text, thus some confusion there.
Testing performed:
Read by line in a document that contained bulletted paragraphs. The next bullet was no longer inappropriately announced.
Created a document that contained format changes within a line. Ensured that the entire line was still read, including all format changes.
Known issues with pull request:
None.
Change log entry:
Bug fixes:
When reading bulleted items in Microsoft Word with UIA enabled, the bullet from the next list item is no longer inappropriately announced. (#9613)