Skip to content

UIA in MS Word: Stop announcing the next bullet on the previous line#10467

Merged
michaelDCurran merged 3 commits into
masterfrom
i9613
Nov 6, 2019
Merged

UIA in MS Word: Stop announcing the next bullet on the previous line#10467
michaelDCurran merged 3 commits into
masterfrom
i9613

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

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)

…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
@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 35f622f1a5

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great for me, thanks for taking this! Just one comment

Comment thread source/UIAUtils.py Outdated
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
@michaelDCurran michaelDCurran merged commit 30e11a5 into master Nov 6, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Nov 6, 2019
michaelDCurran added a commit that referenced this pull request Nov 6, 2019
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.

Additional list numbers read when navigating a list in Word with UIA

4 participants