fix missing highlighter on OCR recognition results#19168
Merged
Conversation
This change ensures that `RecogResultNVDAObject` instances are properly ignored when calculating caret rectangles, allowing highlighters to display correctly. Fixes an issue where visual enhancements were not applied to content recognition results.
hwf1324
commented
Nov 5, 2025
CyrilleB79
reviewed
Nov 5, 2025
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
- Added `api.fakeNVDAObject` set and `api.isFakeNVDAObject` function to identify fake NVDAObject instances. - Registered `RecogResultNVDAObject` as a fake NVDAObject in recogUi module.
SaschaCowley
requested changes
Nov 11, 2025
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
…ct classes Updated the type annotation for `fakeNVDAObjectClasses` to be more specific, indicating it holds types of `documentBase.TextContainerObject`. Also added documentation explaining that these classes represent virtual NVDAObjects.
Contributor
Author
|
I added a docstring for |
SaschaCowley
requested changes
Nov 14, 2025
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
# Conflicts: # user_docs/en/changes.md
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:
Summary of the issue:
There is no highlighter on the recognition result.
Description of user facing changes:
There is a highlighter on the recognition result.
Description of developer facing changes:
Added
api.fakeNVDAObjectClassesset andapi.isFakeNVDAObjectfunction to identify fake NVDAObject instances.Description of development approach:
Do not use the display model to obtain the caret rectangle of fake NVDAObjects.
Testing strategy:
Manual testing: After pressing
NVDA+rto recognize content, move the cursor and observe whether the yellow rectangle follows.Known issues with pull request:
By default, the highlight rectangle currently covers words rather than individual characters.
Code Review Checklist: