Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handle dead caret / selection text ranges in Microsoft Edge #7997

Merged
merged 1 commit into from Mar 6, 2018

Conversation

michaelDCurran
Copy link
Member

Link to issue number:

MS bug 14251419: NVDA Desktop : MSA : We are blocked to Enter password while using NVDA Screen reader.
MS bug 15577569: NVDA announces nothing when user presses ALT + LEFT/RIGHT arrow keys.

Summary of the issue:

In many cases, the UIA textRanges we get from Microsoft Edge, may become broken or die if the page mutates a significant amount.
Two examples:

  • Going back to a previous page with alt+leftArrow: The caret position we had stored previously for that document is now dead and cannot be used to rstore the caret position.
  • Signing into a Microsoft Account with the standard Microsoft Account screen: after entering an email address and pressing enter, nothing is reported for the focus as you move around the page, and links cannot be activated. In this case the caret position we had stored on the cursorManager had died because of signficant page mutations.

Description of how this pull request fixes the issue:

  1. UIABrowsemode documents no longer support remembering the last caret position on a previous document. This never worked and only caused errors.
  2. the Edge TreeInterceptor document overrides makeTextInfo to detect when a broken caret is being fetched. In this case it falls back to using the first position in the document, and updates the stored selection with this.

Testing performed:

  • Read and navigated multiple pages in Microsoft Edge, including switching back and forth in the history. When switching, the new page would be read from the top. Previously in most cases an error would occur and the page would not read.
  • Tried signing into a Microsoft Account: Settings -> accounts -> email and app acocunts -> Add a Microsoft Account. After entering the email address and pressing enter, NVDA correctly reported the password field, and all other controls as focus moved.

Known issues with pull request:

Change log entry:

Bug fixes:

  • NVDA no longer fails to read focused controls in the Microsoft Account sig-in screen in Settings after entering an email address.
  • NVDA no longer fails to read the page when going back to a previous page in Microsoft Edge.

Specifically:
* No longer support remembering the last caret position  for previously visited documents in Edge. This never worked and only caused errors. The UIA textRange we stored could not be used on new documents.
* Detect and fix the case where the textRange we have stored as the browseMode selection dies due to major page mutations.  Replace it with the first psoition in the document in this case.
@Adriani90
Copy link
Collaborator

this could be related to #7838

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.

None yet

4 participants