Skip to content

Added an option to automatically read the entire result after a successful recognition#19150

Merged
SaschaCowley merged 3 commits into
nvaccess:masterfrom
cary-rowen:autoSayAllText
Nov 3, 2025
Merged

Added an option to automatically read the entire result after a successful recognition#19150
SaschaCowley merged 3 commits into
nvaccess:masterfrom
cary-rowen:autoSayAllText

Conversation

@cary-rowen

@cary-rowen cary-rowen commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

Link to issue number:

Resolves #19144

Summary of the issue:

After performing an OCR, users must manually initiate a "say all" command to hear the full recognition result. For users who frequently perform OCR on large blocks of text, this requires an extra step each time, slowing down their workflow.

Description of user facing changes:

  • Adds a new checkbox, "Automatically say all on result", to the Windows OCR settings panel (under Preferences -> Windows OCR).
  • When enabled, NVDA will automatically start reading the full text of a successful OCR result.
  • This feature is disabled by default.

Description of developer facing changes:

  • Adds a new configuration key autoSayAllOnResult (boolean, default False) under the [uwpOcr] section in configSpec.py.

Description of development approach:

To ensure "say all" is triggered only after the recognition result document has focus, a flag (_shouldSayAllOnFirstFocus) is set when the result is first received in _onFirstResult. The actual sayAll command (sayAll.SayAllHandler.readText(sayAll.CURSOR.CARET)) is then called from the event_gainFocus handler of the RefreshableRecogResultNVDAObject.

Testing strategy:

Manually tested by:

  1. Enabling the "Automatically say all on result" option in the Windows OCR settings.
  2. Performing OCR on a navigator object (NVDA+r). Verified that "say all" begins automatically.
  3. Disabling the option and performing OCR again. Verified that "say all" does not start, and only the document title is announced.
  4. Confirmed the setting persists after restarting NVDA.

Known issues with pull request:

The options in Windows OCR do not appear to follow profile switching, which seems to be a general issue and not specific to this change.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@cary-rowen cary-rowen requested review from a team as code owners October 28, 2025 20:57
@cary-rowen cary-rowen changed the title Added an option to automatically read the entire result after a succe… Added an option to automatically read the entire result after a successful recognition Oct 28, 2025

@SaschaCowley SaschaCowley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

Comment thread source/contentRecog/__init__.py Outdated
Comment thread source/contentRecog/uwpOcr.py Outdated

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and will be a useful feature.

@SaschaCowley SaschaCowley enabled auto-merge (squash) October 31, 2025 02:11
@SaschaCowley SaschaCowley merged commit d0b0cb9 into nvaccess:master Nov 3, 2025
52 of 55 checks passed
@github-actions github-actions Bot added this to the 2026.1 milestone Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to automatically "Say All" when a content recognition result loads

4 participants