Skip to content

Vocalize the shortcut to toggle displaying nonprintable characcters i…#10242

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
CyrilleB79:vocalizeDisplayNonprintingChar
Sep 23, 2019
Merged

Vocalize the shortcut to toggle displaying nonprintable characcters i…#10242
michaelDCurran merged 3 commits into
nvaccess:masterfrom
CyrilleB79:vocalizeDisplayNonprintingChar

Conversation

@CyrilleB79

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #10241

Summary of the issue:

In an MS Word Document, look at the end of a paragraph and press Ctrl+Shift+8 (main keyboard) 2 or 3 times. You will see the end of paragraph mark appear and disappear but NVDA does not give a vocal feedback of this action.

Description of how this pull request fixes the issue:

NVDA announces the state of displaying nonprinting characters when the toggle shortcut Ctrl+Shift+8 is executed.

Testing performed:

In a Word document pressed Ctrl+Shift+8 various times.

Blind check

NVDA announce "Display nonprinting character on" or "off" when the shortcut is executed. After each gesture, I have checked in the Home ribbon, group paragraph that the state of "Show all" button is in accordance with the previously announced state.

Visual check

I have checked that NVDA announce "Display nonprinting character on" or "off" when end of paragraph and space marks appear and disappear at the same time.

Known issues with pull request:

None

Change log entry:

Changes
NVDA now announces the state of display non printing character when pressing the toggle shortcut Ctrl+Shift+8 . (#10241)

@JulienCochuyt JulienCochuyt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the new script method decorator instead of the legacy __gestures dictionary.

ui.message(_("Change tracking off"))


def script_toggleDisplayNonprintingCharacters(self, gesture):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def script_toggleDisplayNonprintingCharacters(self, gesture):
@script(gesture="kb:control+shift+8")
def script_toggleDisplayNonprintingCharacters(self, gesture):

Comment thread source/NVDAObjects/window/winword.py Outdated
"kb:control+2":"changeLineSpacing",
"kb:control+5":"changeLineSpacing",
"kb:control+shift+e": "toggleChangeTracking",
"kb:control+shift+8": "toggleDisplayNonprintingCharacters",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"kb:control+shift+8": "toggleDisplayNonprintingCharacters",

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

@JulienCochuyt
Thanks for suggestion. I have committed it on my side. Sorry, I realized just after that proposed suggestions can be directly committed via github (and maybe you would have been credited this way...)

@JulienCochuyt

Copy link
Copy Markdown
Contributor

@JulienCochuyt
Thanks for suggestion. I have committed it on my side. Sorry, I realized just after that proposed suggestions can be directly committed via github (and maybe you would have been credited this way...)

Indeed, but no problem at all.
Thank you for your contribution.

@CyrilleB79

Copy link
Copy Markdown
Contributor Author

Another point:
:
I realize now that the announced messages are a bit long. Especially thinking that they will be translated in languagees more verbose than English. Any idea to shorten them?

Proposal 1:
Display nonprinting characters / Hide nonprinting characters.

Proposal 2:
Display nonprinting chars / Hide nonprinting chars
Would a native english user understand that message? Even with no programming knowledge?

@michaelDCurran

Copy link
Copy Markdown
Member

Proposal 1 is the best as "chars" certainly may not be understood by many users.

@michaelDCurran michaelDCurran merged commit 4ef1ada into nvaccess:master Sep 23, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Sep 23, 2019
michaelDCurran added a commit that referenced this pull request Sep 23, 2019
@CyrilleB79 CyrilleB79 deleted the vocalizeDisplayNonprintingChar branch July 6, 2020 08:20
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.

Vocalize the result of toggle displaying nonprinting characters in MS Word

4 participants