WordDocument with UIA: don't support resolved or draft comments in NVDA Elements List#13341
Merged
Conversation
…DA elements list.
5 tasks
LeonarddeR
approved these changes
Feb 15, 2022
Collaborator
LeonarddeR
left a comment
There was a problem hiding this comment.
Thanks for taking this!
seanbudd
approved these changes
Feb 16, 2022
5 tasks
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:
Supersedes pr #13149
Summary of the issue:
The following error is in the log when viewing annotations in the NVDA elements list:
This is because getCommentInfoFromPosition tries to fetch custom annotation types off its obj property, which it incorrectly expects to be a UIA NVDAObject. But in this case it is a TreeInterceptor.
PR #13149 was opened to address this by specifically creating a UIA NVDAObject rather than getting it from the position TextInfo. However, Further investigation has found that it is actually not necessary to even support custom annotation types (draft comment, resolved comment) in getCommentInfoFromPosition as:
CommentUIATextInfoQuickNavItem.wantedAttribValuesIn short, supporting custom comment annotation types in getCommentInfoFromPosition was not necessary in the first place.
Description of how this pull request fixes the issue:
Remove support for custom comment annotation types from getCommentInfoFromPosition. It again only supports the standard comment annotation type.
Testing strategy:
With a very recent build of Microsoft Word supporting custom annotations:
Known issues with pull request:
This fixes the reported error, but does not make it possible to jump to / list draft or resolved comments. this could be considered at a later stage if Microsoft was ever to expose the more specific custom comment type in the comment object's annotationTypeId.
Change log entries:
None needed.
New features
Changes
Bug fixes
For Developers
Code Review Checklist: