Speak Symbols When moving by word#12710
Conversation
This comment has been minimized.
This comment has been minimized.
208a268 to
16da2f0
Compare
|
From the known issues with this PR:
The changes in commit "Restore initial behavior for dash containing symbols": Restores the removed hyphen behavior. We believe this code historically was required to provide the expected behavior for replacing whitespace characters (via the symbols pronunciation mechanism at level "character"). To resolve the "known issue" tests have been updated to include white space characters . The tests are added to the first commit of this PR to make it easier to assess the changes in behavior with each commit. Reviewing the changes in |
|
Does this also apply to selecting text when SHIFT is added to navigation shortcuts? |
|
I thought I had already commented in this PR but it seems not. So here I go. I did not read it all carefully. However I can affirm that with French OneCore (Hortense), passing "T shirt" (without dash) to the synth instead of "T-shirt" (with dash) leads to an erroneous mispronunciation. Actually, in the latter case, the letter T is pronounced "tee" in English whereas in the first case, it is pronounced "teh" (in French) what is wrong since in the word "T-shirt" the "T" is pronounced in English even in the French word. |
|
Thanks for the information @CyrilleB79. The systems tests for this PR show that before any changes, when moving by word in notepad, the synth is sent "t shirt" (no dash). Can you confirm that recent releases of NVDA using French OneCore this problem exists? At this stage I expect we'll remove the code that results in the dashes being removed, but since it is a change in behavior I'm being cautious. |
3bf1423 to
ac6a775
Compare
seanbudd
left a comment
There was a problem hiding this comment.
Great work here, the general approach and testing looks good to me.
| """This method prepares a list, which contains character and its description for all characters the text is | ||
| made up of, by checking the presence of character descriptions in characterDescriptions.dic of that locale | ||
| for all possible combination of consecutive characters in the text. |
There was a problem hiding this comment.
I found this hard to parse, is this correct?
| """This method prepares a list, which contains character and its description for all characters the text is | |
| made up of, by checking the presence of character descriptions in characterDescriptions.dic of that locale | |
| for all possible combination of consecutive characters in the text. | |
| """This method prepares a list, where each item is a tuple of characters and a list of the description for all | |
| characters the text is made up of. | |
| This is generated by checking the presence of character descriptions in characterDescriptions.dic of the given | |
| locale for all possible combination of consecutive characters in the text. |
There was a problem hiding this comment.
To be honest I'm not sure. I just broke it up into shorter lines and added return type information.
I don't think I could reword this quickly.
|
I'll squash these latest commits into the branch once this is approved. |
|
@feerrenrut What I'm missing from the description of this PR is a reassurance for add-on authors that introduction of these new speech commands is not going to cause breakage for them. Could you please describe any testing that you've done with add-ons (particularly with ones which were causing troubles with introduction of the new speech commands such as NVDA Remote)? |
seanbudd
left a comment
There was a problem hiding this comment.
Thanks @feerrenrut, LGTM pending confirmation that add-ons are not broken
|
@lukaszgo1 No, this hasn't been looked at, good catch. It certainly is a tricky one. Our intention certainly is not to break add-ons, but the cost could be a more complicated codebase (full of workarounds), or being unable to take up new features / fix issues (such as this PR) until a point one release. Since these ARE speech commands, they should be handled (and likely ignored) by addons. Granted, for addons (such as NVDA remote) that need to process speech, loosing this speech would be a problem. I'll look into whether this affects NVDA remote, and also consider how we can alter the approach. |
|
After some investigation into different approaches, it will be very difficult to introduce this feature without introducing a lot of complexity, or potentially degrading addons. Instead, we'll postpone this feature until the 2022.1 release. |
@feerrenrut, no, surprisingly, this problem does not exist. I have been using nvda_snapshot_alpha-23630,0f481d8a.exe and I have tested with French OneCore (Hortense) in Notepad. The results are:
I have activated the log of SpeechManager debug messages and saw something very strange:
I have no explanation why the dash is removed in English but not in French. But this makes the T-shirt read correctly by chance... |
|
Is it possible that the difference between symbol usage between English and French is due to differences in For French, the line is: |
This should not make a difference, no? I guess that if the level is not specified in a locale .dic file, the level is inherited from English. |
Qchristensen
left a comment
There was a problem hiding this comment.
I don't have an answer to the French pronunciation of T-Shirt either - does it vary when testing with different synthesizers? (which would likely indicate a pronunciation issue with one synth). Just trying to think of other similar things... T-Rex, the dinosaur, or T-Ball, the kids sport.
Otherwise, updates to changes and user guide look fine.
|
@CyrilleB79 It would be great to introduce French variations of the system tests. Hopefully NVDA isn't affected too heavily by the Windows language. Though system tests are a good way to find that. |
Is there any interest in general in making system tests working on non English versions of Windows - for now they don't work at all. |
|
Rather than specifically a French version of windows, I would start with NVDA set to French language for certain system tests that exercise aspects that may be broken more easily (EG symbol processing, decimal, perhaps dates)?. Ideally this should work on any machine, we should invert the dependency on Windows API calls so that it can be controlled during a system test. |
|
Hi @feerrenrut Thanks for this summary.
Actually #10855 is already fixed in 2020.3 as explained in #10855 (comment). So this PR just fixes #11779.
Yes, this should be enough to mitigate the risk of reverting this PR (on the contrary to what I have written before).
Yes this makes sense. This PR should be merged as soon as possible in order to identify if some more messages should be wrapped in UI speech command during alpha or beta testing phase. Just one last point: you haven't answered to #12710 (comment), i.e. symbols are not reported when selecting by word.
|
|
I still stand by my opinion that this should not be merged as is.
While this works for word navigation this PR also changes the behavior when navigating by character. The entire sequence is spoken at a level all which causes punctuation in names of the table header and in style names to be wrongly reported and this cannot be controlled by the user.
As demonstrated by the comment to which I've linked above this mechanism is not good enough. While you would be able to fix style names not being reported with the level all by enclosing them in the right speech command the same cannot be done for names of table headers. What worries me is that I see no way to improve the situation without introducing additional backwards incompatible changes meaning that any fixes would have to wait until 2023.1. |
Sorry, but IMO it is not out of scope of this PR.
Sorry, I had missed this point. I completely agree with you. The use case moving by character in a table with headers containing symbols is a real-life use case and merging this PR as is would introduce a visible regression. |
I agree that currently this is inconsistent, but there is no visible change in the behavior when selecting text, this can be worked on in a follow up PR and it is not necessary to fix #11779. |
This reverts commit 619e5f7. Additionally re-enable and update tests so expectation matches behaviour.
Update tests to show change in behaviour
Update tests to show inital behaviour restored for right pointing arrow and t shirt symbols.
0e3f2c2 to
d1603a7
Compare
|
I have tested table headers with a codepen sample and didn't find any situation that had been made worse. Ideally, add an automatic test case to demonstrate the "before" behavior on We have exhausted the amount of time we can dedicate to this now. I'll spend a little time on on Monday to write up where this stands, document the approach, and clean up the open issues to clarify goals. I'll close this PR, anyone wishing to pick this up should open a new one. |
You can reproduce the regression as follows:
While dropping this work after so much time has been spend on it must have been difficult I really applaud you for doing a right thing here! The fact that we can merge code when it is working as best as possible rather that on some arbitrary deadline is one of the main reasons why I find working on Open Source stuff so rewarding personally. |
|
Let's be clear about the behavior with the table:
This case is questionable, some thoughts on the matter:
Note, with the approach demonstrated here, and with #12779 the goal would be to have no un-annotated strings in speech sequences anymore. This would require introducing a "Content" type (in addition to UserInterface, and Symbol). There are few different approaches that we can consider:
|
|
If this gets picked up again, I'd recommend the first step be to rebase onto #13305 and confirm the output with those tests. |
Related to issue #11779, #10855, and PR #12710 Summary: There a number of pre-existing problems with symbol pronunciation in NVDA. They are hard to reason about due to the variety of settings that can affect behavior. Examples with Symbol level all: - '👕' symbol ("t-shirt") spoken as 't dash shirt' when moving by word or character - Text "don't" spoken as "don tick t" when moving by word - Symbols in NVDA speech UI (EG "spelling error" in French "Faute d'orthographe") are processed as symbols. The example "Faute d'orthographe" becomes "Faute d apostrophe orthographe", equivalent to "spelling e tick rror" in English, except that "apostrophe" is a longer word than "tick". Description of change: Does not introduce user visible changes, intended to help developers reason about the behavior of NVDA. In tests Symbol level All and None are used as the boundary cases for behavior. The tests are introduced to demonstrate behavior with: - Moving by word, line, character. - Selecting by word, line, character. - Symbol Level All when speech UI contains a symbol. For this, the System Test Spy global plugin had to be modified to alter translation strings of NVDA at runtime. - Secondary (contextual) content containing symbols. EG column headers spoken when moving between cell boundaries.
|
Adding the abandoned label here so people can find this great valuable work by filtering that label. cc: @raducoravu, @dmitrii-drobotov in case you are interested in the mechanics of how NVDA treats symbols when navigating word by word, maybe you'd like to contribute. This PR would improve word navigation alot, still it needs to be rebased onto the current master and would ofcourse need some further testing by the community. |
Closed reason.
This requires an API breaking change, time ran out prior to the 2022.1 release while resolving usage and design concerns.
_("The column's name is %s"). The apostrophe should not be announced astick, but if the the column name should be processed eg for column namedon't:"The column's name is don tick t"strto ensure that they can be used in the same way is prior items in the speech sequence, however this also means it is easy for a logic error to drop the extra information provided by a class.Link to issue number:
#12695
Fixes: #10855
Fixes #11779
Summary of the issue:
NV Access took open this abandoned PR:
Recent history: PR #12695 reverted PR #11856 fixing a regression described in issue #12653.
Navigation by word is inconsistent among different editors.
This might lead to different symbol announcements, or opening and closing symbols not announced consistently.
Description of how this pull request fixes the issue:
This propagates the initial intention and semantics of the speech sequence item.
Intentionally changes behavior for symbol text sent to synth when moving by word. This now matches the behavior for moving by line. The hyphen character in symbols like "t-shirt" and "right-pointing arrow" are sent to the synthesizer.
Note, commits have been carefully authored to show the progression of changes, however there are two commits that can be ignored, which only tidy related code:
The notepad tests have been confirmed to pass for all commits, looking at the changes to these tests will demonstrate the changes in behavior with that commit.
Testing strategy:
Known issues with pull request:
None
Change log entries:
Already included in PR, see diff.
Code Review Checklist: