speech.getControlFieldSpeech: avoid exception which stops a line from being read.#18130
Merged
Conversation
SaschaCowley
approved these changes
May 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None
Summary of the issue:
When trying to read some lines in Chomium, such as a list item with a checkbox at the start, the following traceback is produced and the line is not read:
The code assumes the next field in the list is a string, but in this case it is a controlEnd (from a checkbox with no content inside).
Description of user facing changes
NVDA no longer refuses to read a line in Google Chrome / Edge where a list item starts with a checkbox, such as within a check list in Microsoft Loop.
Description of development approach
Ensure the field is an str before calling isspace or strip.
Testing strategy:
In Google Chrome, read the line produced by:
Known issues with pull request:
In this case, the specific code here that is meant to speak the string as a single character will not run. But this is a very rare case, and it is arguable that the browser content and or control fields may be wrong here anyway. At least we will still speak the line and not cause an exception.
Code Review Checklist:
@coderabbitai summary