Skip to content

Report spelling errors with a sound while reading#17997

Merged
SaschaCowley merged 49 commits into
nvaccess:masterfrom
CyrilleB79:spellingSound
Sep 5, 2025
Merged

Report spelling errors with a sound while reading#17997
SaschaCowley merged 49 commits into
nvaccess:masterfrom
CyrilleB79:spellingSound

Conversation

@CyrilleB79

@CyrilleB79 CyrilleB79 commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #4233
Supersedes #10474

Summary of the issue:

Users want to have spelling errors reported by a sound rather than by a spoken phrase while reading.

Description of user facing changes

In Document formatting settings, reporting of spelling errors is now controlled with a 3-choice combo box:

  • off: not reported at all
  • Speech: reported as before with spokenn text
  • Sound: reported with a sound, the same buzzer sound already used to report spelling errors when typing

The default is still to report spelling errors by speech.

As previously, spelling errors are not reported when navigating by cell (in tables), or by paragraph.

"out of spelling error" is still reported as a spoken message in any case since defining a sound for this specific message would not be worth it; this message is only reported during the navigation by character or word.

Context:

#4233 is open for more than 10 years. a solution is asked from time to time and having it fixed would really be useful.

PR #10474 was opened more than 5 years ago as a solution for this issue; thanks @jcsteh for this first work. Unfortunately it has been closed as abandoned.

This PR is an attempt to provide a minimal fix for #4233 so that the feature is not delayed 5 more years.

Description of development approach

  • Converted binary flag to bitwise in settings dialog (check list box), config, etc. similarly to what is done for NVDA key selection.
  • Implemented config upgrade to convert boolean setting to integer
  • When getting text info from documents, take advantage that ReportSpellingErrors.OFF value is 0 and thus evaluate as a False boolean, so that spelling errors are retrieved in text info only for speech or sound.

Testing strategy:

  • Manual test of navigation by character, word, line paragraph, table cell, say all
  • Tested with eSpeak, IBMTTS, OneCore.
  • Automated tests should still pass

Known issues with pull request:

  1. For simplicity, grammar error reporting is not handled in this PR. This point can be discussed/changed in a subsequent issue or PR if needed. Replacing grammar errors reporting by a sound would require to have a different sound, that can be distinguished from spelling error sound, but that would record it, e.g. a different buzzer sound. The problem is that grammar errors are rarely reported in NVDA: they are frequent in Word but NVDA does not report them and they are reported on the web but are rarely present there. Using a sound for a rare event is problematic because becomes difficult for people to learn for what the sound is used.

  2. This PR is a minimalist and pragmatic solution for Provision of indication options for reporting spelling errors. #4233. An alternative could be a more general architecture allowing to replace by sounds more formatting or structural indications while reading text. My position is to merge this small PR to address the spelling error concern quite quickly and allow to develop a more ambitious and general framework in the future if/when needed.

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.

@coderabbitai summary

@CyrilleB79 CyrilleB79 changed the title Spelling sound Report spelling errors with a sound while reading Apr 22, 2025
@LeonarddeR

Copy link
Copy Markdown
Collaborator

How does this pr relate to #10474?

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

How does this pr relate to #10474?

I have taken over the core code implemented in #10474 that was abandoned and added the GUI stuff here. I have updated the initial description, thanks. By the way, I had already credited @jcsteh along with myself in the change log for this.

@CyrilleB79 CyrilleB79 marked this pull request as ready for review April 23, 2025 08:50
@CyrilleB79 CyrilleB79 requested review from a team as code owners April 23, 2025 08:50
@seanbudd seanbudd self-requested a review April 29, 2025 00:00
Comment thread source/speech/speech.py Outdated
Comment thread source/config/configFlags.py Outdated
Comment thread source/config/configSpec.py Outdated
Comment thread source/config/configSpec.py Outdated
Comment thread source/globalCommands.py Outdated
Comment thread source/gui/settingsDialogs.py Outdated

@seanbudd seanbudd 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.

note - partial review - just caught a few minor things

Comment thread source/speech/speech.py Outdated
Comment thread source/gui/settingsDialogs.py Outdated
Comment thread source/config/configSpec.py Outdated
@SaschaCowley SaschaCowley marked this pull request as draft May 2, 2025 02:20
CyrilleB79 and others added 3 commits May 5, 2025 15:29
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label May 5, 2025
@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@SaschaCowley or @seanbudd, I am also wondering if setting the sound as the default option could be acceptable. What is your opinion on this?

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Ping @SaschaCowley and @seanbudd.

This PR remains in draft state since there are pending questions here for you:

And also, do you expect something from me?

@seanbudd seanbudd marked this pull request as ready for review May 29, 2025 04:23
@seanbudd

Copy link
Copy Markdown
Member

@CyrilleB79 - please mark PRs as ready if you want a response from NV access. We don't check drafts as regularly

@SaschaCowley

Copy link
Copy Markdown
Member

@CyrilleB79 I wouldn't set sound as the default in this PR.

@seanbudd seanbudd marked this pull request as draft June 3, 2025 04:16
@CyrilleB79 CyrilleB79 marked this pull request as ready for review August 30, 2025 22:18

@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.

A few minor changes, and a suggestion about how the behaviour of this setting could be changed

Comment thread source/config/profileUpgradeSteps.py
Comment thread source/gui/settingsDialogs.py Outdated
Comment thread source/gui/settingsDialogs.py Outdated
Comment thread user_docs/en/userGuide.md
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
Comment thread source/config/profileUpgradeSteps.py
@SaschaCowley SaschaCowley enabled auto-merge (squash) September 5, 2025 00:37
@SaschaCowley SaschaCowley enabled auto-merge (squash) September 5, 2025 00:41

@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.

Reads well and will be a welcome change for users

@SaschaCowley SaschaCowley merged commit c07d261 into nvaccess:master Sep 5, 2025
40 checks passed
@github-actions github-actions Bot added this to the 2026.1 milestone Sep 5, 2025
@CyrilleB79 CyrilleB79 deleted the spellingSound branch September 5, 2025 20:10
SaschaCowley pushed a commit that referenced this pull request Apr 20, 2026
Fix-up of #17997


[Reported](https://groups.io/g/nvda-fr/topic/nvda_2026_1_beta_et_l_annonce/118894622)
on French mailing list.

### Summary of the issue:
In 2026.1beta versions, spelling errors are no longer reported in Word
legacy.

### Description of user facing changes:
Spelling errors can now again be reported in Word legacy.

### Description of developer facing changes:
N/A
### Description of development approach:
In #17997, the config key "reportSpellingErrors" has been modified to
"reportSpellingErrors2" due to upgrade. But one use of this config key
has been forgotten. It is being fixed here.

### Testing strategy:
Manual tests with legacy and UIA Word.

### Known issues with pull request:
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-breaking-change conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provision of indication options for reporting spelling errors.

6 participants