Skip to content

Add an option to prevent speech being interrupted while scrolling the braille display#13131

Merged
seanbudd merged 19 commits into
nvaccess:masterfrom
bramd:i2124
Jul 19, 2022
Merged

Add an option to prevent speech being interrupted while scrolling the braille display#13131
seanbudd merged 19 commits into
nvaccess:masterfrom
bramd:i2124

Conversation

@bramd

@bramd bramd commented Dec 4, 2021

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #2124

Summary of the issue:

Some people prefer to be able to read in braille while still listening to the speech output for the current line/object. This is currently not possible, because every braille gesture will interrupt speech.

Description of user facing changes

Adds a new setting: "Interrupt speech while scrolling", default is "enabled".
The new setting determines if speech should be interrupted when the Braille display is scrolled backwards/forwards.
Previous/next line commands are not affected.

This is added as an option because some speech+braille users prefer a bimodal interaction pattern.

  • For these users, speech may be distracting while reading Braille.
  • These users repetitively swap between primarily focusing on speech or braille.
  • For these users, the current and expected UX for cancelling speech when reading braille is to scroll the line of braille.
  • Considering alternatives:
    • Most braille devices cannot detect fingers reading the display.
    • Using an additional braille gesture just to cancel speech will slow users down / isn't a good use of a button on a display.

To preserve the existing behavior, the option is enabled by default, interrupting speech when scrolling.

  • Disabling this option allows speech to be heard while the user is simultaneously reading Braille.
  • Users who don't find speech distracting with Braille, or rely on both Braille and speech, may prefer to disable the option.

Description of how this pull request fixes the issue:

Add an option to interrupt speech while the display is being scrolled.
This option is enabled by default, so the previous behavior is preserved.
This implementation only works for scroll previous/next display and does not affect other gestures such as previous/next line.

Testing strategy:

Tested using a Handy Tech braille display by turning this setting off/on and checking if the behavior was as expected. No unit tests or system tests have been added.

Known issues with pull request:

This can't be tested without a braille display: blocked by #13917

Change log entries:

Refer to diff

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

bramd added 2 commits December 4, 2021 13:13
…lling the braille display. This is enabled by default to preserve the old behavior.
@bramd bramd requested review from a team as code owners December 4, 2021 12:28
@bramd bramd marked this pull request as draft December 4, 2021 12:35
@bramd bramd marked this pull request as ready for review December 4, 2021 12:53
@bramd

bramd commented Dec 4, 2021

Copy link
Copy Markdown
Contributor Author

It seems I'm unable to assign any additional reviewers to this. I consider this ready for review, but would like to hear what @LeonarddeR, @dkager and @AAClause think about this since they have been commenting on the issue.

@LeonarddeR

Copy link
Copy Markdown
Collaborator

I wonder, would you mind implementing a solution that allows overriding the speech effect on the script rather than on the gesture? I find it slightly ugly that this has to be done on the gesture level, though it is currently by design. However, the current implementation isn't going to work with the SuperBraille braille display, for example.

@dkager

dkager commented Dec 4, 2021

Copy link
Copy Markdown
Contributor

While I agree with Leonard, I must also say this patch is elegantly compact. Though matching on script name is perhaps not as robust as introducing a variable to determine whether it is a scrolling command.

@bramd

bramd commented Dec 7, 2021

Copy link
Copy Markdown
Contributor Author

Adding an isScrollingCommand or similar property to the scripts is a possibility for sure. However, I'm not sure if it would be correct to put the speech command as a side effect in the scripts.

The Superbraille is a bit of an edge case I didn't consider. That being said, I think this option should work regardless of what the source of the gesture is. That raises the question where to put this behavior. I don't really like adding side effects to scripts (see above), so that would mean we implement this in the base class of all gestures.

@LeonarddeR

Copy link
Copy Markdown
Collaborator

I don't really like adding side effects to scripts

Shouldn't wat the gesture does be determined by the script, and shouldn't the script determine what to do with speech?

Comment thread source/braille.py Outdated
Comment thread source/braille.py Outdated

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That last line in the userGuide.t2t change could be a little ambiguous - maybe split into two sentences?

Comment thread user_docs/en/userGuide.t2t Outdated
@seanbudd seanbudd marked this pull request as draft February 21, 2022 05:37
@seanbudd seanbudd marked this pull request as ready for review February 21, 2022 05:44
@seanbudd

Copy link
Copy Markdown
Member

Sorry @bramd - we need a chance to suggest an alternative implementation.

@feerrenrut feerrenrut added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Mar 18, 2022
@seanbudd

Copy link
Copy Markdown
Member

I've pushed some changes to add Tags to the scriptHandler API. This new approach still needs testing.

@seanbudd

Copy link
Copy Markdown
Member

Would anybody be able to test the code?

Requested @feerrenrut review for the API change I have introduced to scriptHandler

@AppVeyorBot

This comment was marked as off-topic.

@seanbudd seanbudd self-assigned this Jun 22, 2022
@seanbudd seanbudd added the merge-early Merge Early in a developer cycle label Jun 28, 2022

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

User Guide reads well, good work.

@seanbudd

Copy link
Copy Markdown
Member

I'm going to also add notes on this in the user guide.

@seanbudd

Copy link
Copy Markdown
Member

@feerrenrut - can you review the user guide changes and update to the PR description?

@feerrenrut feerrenrut 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.

Can you update the title of the PR to be relative to the added behavior.
The pre-existing behavior is to interrupt, so perhaps: No speech interrupt for scroll braille command

The following seems ambiguous to me:

Previous/next line commands are not affected.

Perhaps this means the new user preference does not change the behavior of these commands, or that these commands don't interrupt speech in the first place.

Comment on lines +1415 to +1422
This setting determines if speech should be interrupted when the Braille display is scrolled backwards/forwards.
Previous/next line commands are not affected.

Speech may be found distracting while reading Braille.
As such, this option is enabled by default, interrupting speech when scrolling.

Disabling this option allows speech to be read along with Braille.

@feerrenrut feerrenrut Jul 15, 2022

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.

A general question:

  • Is "interrupting" a clear enough term for user?
  • Are there any/few/many prior usages of "Interrupt" is there with regards to speech?
    • Would "stopping/stopped/cancelled" be clearer?
Suggested change
This setting determines if speech should be interrupted when the Braille display is scrolled backwards/forwards.
Previous/next line commands are not affected.
Speech may be found distracting while reading Braille.
As such, this option is enabled by default, interrupting speech when scrolling.
Disabling this option allows speech to be read along with Braille.
This setting determines if speech should be interrupted when the Braille display is scrolled backwards/forwards.
Previous/next line commands always interrupt speech.
On-going speech might be a distraction while reading Braille.
For this reason the option is enabled by default, interrupting (stopping) speech when scrolling braille.
Disabling this option allows speech to be heard while simultaneously reading Braille.

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.

For other example of the word "interrupt" with speech, see the following options:

@feerrenrut

Copy link
Copy Markdown
Contributor

I also made some edits directly to the description. Please check the history.

@seanbudd

Copy link
Copy Markdown
Member

@feerrenrut - The edits to the description appear fine, I have also pushed changes to the user guide.

@seanbudd seanbudd changed the title Add an option to determine if speech should be interrupted while scrolling the braille display Add an option to prevent speech being interrupted while scrolling the braille display Jul 18, 2022
@seanbudd seanbudd requested a review from feerrenrut July 18, 2022 03:31

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

User guide change reads well.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 2185a6f716

@seanbudd seanbudd removed the merge-early Merge Early in a developer cycle label Jul 18, 2022
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 2185a6f716

@seanbudd seanbudd merged commit 8205206 into nvaccess:master Jul 19, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.3 milestone Jul 19, 2022
seanbudd added a commit that referenced this pull request Jul 26, 2022
…display (#13932)

Link to issue number:
Fixup of #13131

Summary of the issue:
#13131 incorrectly checks the script commands. The initial PR did not use the correct instance of global commands, rather references to the class methods.

Description of user facing changes
#13131 works as intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked/needs-testing conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to select wether to interrupt speech while scrolling the braille display

9 participants