diff --git a/source/globalCommands.py b/source/globalCommands.py index 7ce329cf161..10aaf7d11e5 100644 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -3109,6 +3109,14 @@ def script_recognizeWithUwpOcr(self, gesture): # Translators: Reported when Windows 10 OCR is not available. ui.message(_("Windows 10 OCR not available")) return + from visionEnhancementProviders.screenCurtain import ScreenCurtainProvider + screenCurtainId = ScreenCurtainProvider.getSettings().getId() + screenCurtainProviderInfo = vision.handler.getProviderInfo(screenCurtainId) + isScreenCurtainRunning = bool(vision.handler.getProviderInstance(screenCurtainProviderInfo)) + if isScreenCurtainRunning: + # Translators: Reported when screen curtain is enabled. + ui.message(_("Please disable screen curtain before using Windows 10 OCR.")) + return from contentRecog import uwpOcr, recogUi recog = uwpOcr.UwpOcr() recogUi.recognizeNavigatorObject(recog) diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index e6fb263c544..b17f71c3213 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -10,6 +10,7 @@ What's New in NVDA == Changes == - 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) +- NVDA now prevents the user from performing Windows 10 OCR if screen curtain is enabled. (#11911) == Bug Fixes == diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index 7623e1ffc9a..95c25fd8b99 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -794,6 +794,8 @@ For this situation, NVDA contains a feature called "screen curtain" which can be You can enable the Screen Curtain in the [vision category #VisionSettings] of the [NVDA Settings #NVDASettings] dialog. +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. + + Content Recognition +[ContentRecognition] 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. 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. You can set the language to use for text recognition in the [Windows 10 OCR category #Win10OcrSettings] of the [NVDA Settings #NVDASettings] dialog. Additional languages can be installed by opening the Start menu, choosing Settings, selecting Time & Language -> Region & Language and then choosing Add a language. +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. + %kc:beginInclude To recognize the text in the current navigator object using Windows 10 OCR, press NVDA+r. %kc:endInclude