Skip to content

Commit 96b1f0d

Browse files
authored
Merge 2d34fb7 into c5697d6
2 parents c5697d6 + 2d34fb7 commit 96b1f0d

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

source/globalCommands.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,6 +3109,14 @@ def script_recognizeWithUwpOcr(self, gesture):
31093109
# Translators: Reported when Windows 10 OCR is not available.
31103110
ui.message(_("Windows 10 OCR not available"))
31113111
return
3112+
from visionEnhancementProviders.screenCurtain import ScreenCurtainProvider
3113+
screenCurtainId = ScreenCurtainProvider.getSettings().getId()
3114+
screenCurtainProviderInfo = vision.handler.getProviderInfo(screenCurtainId)
3115+
isScreenCurtainRunning = bool(vision.handler.getProviderInstance(screenCurtainProviderInfo))
3116+
if isScreenCurtainRunning:
3117+
# Translators: Reported when screen curtain is enabled.
3118+
ui.message(_("Please disable screen curtain before using Windows 10 OCR."))
3119+
return
31123120
from contentRecog import uwpOcr, recogUi
31133121
recog = uwpOcr.UwpOcr()
31143122
recogUi.recognizeNavigatorObject(recog)

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ What's New in NVDA
1010

1111
== Changes ==
1212
- In browse mode, controls can now be activated with braille cursor routing on their descriptor (ie. "lnk" for a link). This is especially useful for activating eg. check-boxes with no labels. (#7447)
13+
- NVDA now prevents the user from performing Windows 10 OCR if screen curtain is enabled. (#11911)
1314

1415

1516
== Bug Fixes ==

user_docs/en/userGuide.t2t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ For this situation, NVDA contains a feature called "screen curtain" which can be
794794

795795
You can enable the Screen Curtain in the [vision category #VisionSettings] of the [NVDA Settings #NVDASettings] dialog.
796796

797+
When the screen curtain is active some tasks directly based on what appears on the screen such as performing [OCR #Win10Ocr] or taking a screenshot cannot be achieved.
798+
797799
+ Content Recognition +[ContentRecognition]
798800
When authors don't provide sufficient information for a screen reader user to determine the content of something, various tools can be used to attempt to recognize the content from an image.
799801
NVDA supports the optical character recognition (OCR) functionality built into Windows 10 to recognize text from images.
@@ -815,6 +817,8 @@ NVDA can use this to recognize text from images or inaccessible applications.
815817
You can set the language to use for text recognition in the [Windows 10 OCR category #Win10OcrSettings] of the [NVDA Settings #NVDASettings] dialog.
816818
Additional languages can be installed by opening the Start menu, choosing Settings, selecting Time & Language -> Region & Language and then choosing Add a language.
817819

820+
Windows 10 OCR may be partially or fully incompatible with [NVDA vision enhancements #Vision] or other external visual aids. You will need to disable these aids before proceeding to a recognition.
821+
818822
%kc:beginInclude
819823
To recognize the text in the current navigator object using Windows 10 OCR, press NVDA+r.
820824
%kc:endInclude

0 commit comments

Comments
 (0)