nvda
c07d2614 - Report spelling errors with a sound while reading (#17997)

Commit
1 year ago
Report spelling errors with a sound while reading (#17997) 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 #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.
Author
Parents
Loading