Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If reading a word and it contains only a symbol and white space, read symbol irrespective of symbol level (#5133) #11167

Merged

Conversation

JulienCochuyt
Copy link
Collaborator

Link to issue number:

Fixes #5133

Summary of the issue:

Currently, when navigation by word lands on a single symbol followed by white space, NVDA sometimes says nothing at all.

Description of how this pull request fixes the issue:

Implemented the solution described by @jcsteh in #5133 (comment):

In speech.py, in speakTextInfo around line 853, we check len(textWithFields[0])==1. This needs to be changed so that we strip white space from textWithFields[0] before checking the length. Note that we shouldn't strip if the text contains only white space, since that would cause, for example, single tab characters to be silenced when moving by word.

Testing performed:

Known issues with pull request:

Change log entry:

Section: Bug fixes

NVDA now always speaks when navigating by word and landing on any single symbol followed by white space, whatever the verbosity settings.

@michaelDCurran michaelDCurran merged commit c154026 into nvaccess:master Jun 22, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.2 milestone Jun 22, 2020
michaelDCurran added a commit that referenced this pull request Jun 22, 2020
@JulienCochuyt JulienCochuyt deleted the i5133-navByWordSpeakSymbol branch June 23, 2020 01:19
@feerrenrut feerrenrut modified the milestones: 2020.2, 2020.3 Jun 23, 2020
@Adriani90
Copy link
Collaborator

@JulienCochuyt thanks for the work on this. I would have following suggestions, could you also cover following use cases?

  • This seems not to work in browsers (i.e. in edit fields or in browse mode)
  • Could word by word navigation be added also for symbols next to each other? (i.e. parantesis and period are not read separately, in fact they are not reported at all when pressing ctrl+right arrow on them. Actually from a pronounciation point of view, every symbol is one word.

@JulienCochuyt
Copy link
Collaborator Author

@Adriani90 wrote:

  • This seems not to work in browsers (i.e. in edit fields or in browse mode)

Actually, it does, but the scope of issue #5133 is pretty narrow: It only handles cases like (copy the following line in a browser's address bar:
data:text/html,a<br/>?<br/>b

  • Could word by word navigation be added also for symbols next to each other? (i.e. parantesis and period are not read separately, in fact they are not reported at all when pressing ctrl+right arrow on them. Actually from a pronounciation point of view, every symbol is one word.

I agree this would be preferable, but also much more complicated to generalize.
I fixed this pretty simple scenario because it was straight forward, but we'll probably need much more thoughts to properly handle all cases/languages/contexts.
Could you please take the time to open a dedicated issue targeted at this bigger work?

@Adriani90
Copy link
Collaborator

@JulienCochuyt thanks for your reply. Actually there are two issues in place which, if fixed, would lead to the expected behavior. See #10846 and #8057.

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.

If reading a word and it contains only a symbol and white space, Read symbol irrespective of symbol level
5 participants