From 505c9d6155607cfaeefe4145f46c670d948e1c92 Mon Sep 17 00:00:00 2001 From: Cyrille Bougot Date: Tue, 8 Dec 2020 00:04:35 +0100 Subject: [PATCH 1/2] Prevent running Windows 10 OCR if screen curtain is enabled. --- source/globalCommands.py | 8 ++++++++ user_docs/en/userGuide.t2t | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/source/globalCommands.py b/source/globalCommands.py index d2cef5326bd..c1a8eb3485c 100644 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -2596,6 +2596,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/userGuide.t2t b/user_docs/en/userGuide.t2t index 17e845334cb..5b391f8b133 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 From 2d34fb797321d21655ccf1307ba2874fdf3473cd Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Thu, 21 Jan 2021 09:01:56 +1000 Subject: [PATCH 2/2] Update what's new --- user_docs/en/changes.t2t | 1 + 1 file changed, 1 insertion(+) 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 ==