Skip to content

MS Word with UIA: ensure document is appropriately scrolled when programmatically setting the caret#12851

Merged
michaelDCurran merged 3 commits into
masterfrom
i9611_updateCaret
Sep 16, 2021
Merged

MS Word with UIA: ensure document is appropriately scrolled when programmatically setting the caret#12851
michaelDCurran merged 3 commits into
masterfrom
i9611_updateCaret

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Sep 15, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #9611
Replaces #12829

Summary of the issue:

In Microsoft Word with UIA enabled, the caret may fail to move to the right position when updated programmatically, if the new position is currently off-screen.
Specifically:

  • When performing say all and reading past the current page, the document does not scroll and the caret ends up at a random position on the current page.
  • In Browse mode, performing a say all, navigating with quick nav, or just moving the arrow keys such that the browse mode cursor moves off the current page, the real (focus mode) caret ends up at a random position on the current page.

Description of how this pull request fixes the issue:

WordDocumentTextInfo's updateCaret and updateSelection methods now ensure that the document is currently scrolled such that the text range is visible on screen.

Testing strategy:

@Qchristensen has confirmed that issue #9611 has been fixed by testing say all in focus mode, and say all, quick nav and arrow keys in browse mode.

Known issues with pull request:

This specifically addresses browse mode scrolling issues in MS Word with UIA enabled as these scrolling issues were also affecting syncing of the focus mode caret with the browse mode caret. But there remains scrolling issues in other apps, which have always existed. Pr #9919 goes much further in addressing all of these, but is rather complex and requires a lot more review and testing. This particular pr is much smaller and stays specific to what we need to unblock enabling UIA by default in MS Word.

Change log entries:

Bug fixes:

  • Reading / navigating with browse mode in Microsoft Word via UI automation now ensures the document is always scrolled so that current browse mode position is visible, and that the caret position in focus mode correctly reflects the browse mode position.

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • API is compatible with existing addons.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

…t position, ensure that the document is scrolled such that the range is visible on screen.
Comment thread user_docs/en/changes.t2t Outdated
Comment thread user_docs/en/changes.t2t Outdated
Co-authored-by: Sean Budd <sean@nvaccess.org>
@michaelDCurran michaelDCurran merged commit 2cc3aa4 into master Sep 16, 2021
@michaelDCurran michaelDCurran deleted the i9611_updateCaret branch September 16, 2021 07:42
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Sep 16, 2021
@feerrenrut

Copy link
Copy Markdown
Contributor

Could this be a fix for #12855?

@cary-rowen

Copy link
Copy Markdown
Contributor

I also want to know if #12855 is related to this and can it be fixed?

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.

Focus movement changing between focus and browse mode with UIA in Word 365

5 participants