Show local ui.messages in braille when controlling a remote computer#19056
Conversation
|
@LeonarddeR this isn't finished yet, and is a rather ugly hack, but I seem to have it mostly working. Would you mind letting me know what you think of this approach if you have time? Hopefully it is clear where I'm going - I will of course be documenting more once I have it working |
|
I actually consider this solution to be pretty elegant. Executing the getter to re-eveluate state is indeed a bit ugly. May be _get_enabled should be split into a new method _reEvaluateEnabledState or something like that. |
|
Thanks, @LeonarddeR, I'll consider that |
There was a problem hiding this comment.
Pull Request Overview
This PR enables braille users to read local ui.message content when controlling a remote computer via NVDA Remote Access. Previously, these messages were only available to speech users, creating an accessibility gap for braille-only users.
- Adds extension points to manage braille message display coordination between local and remote contexts
- Temporarily switches braille control back to the local machine when displaying
ui.messagecontent - Implements proper handling of braille navigation keys (scrolling/routing) for local messages while blocking other input
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| user_docs/en/changes.md | Documents the new feature in the changelog |
| source/braille.py | Adds extension points and modifies message handling to support remote access scenarios |
| source/_remoteClient/session.py | Handles braille gesture routing during local message display |
| source/_remoteClient/localMachine.py | Implements core logic for switching between local and remote braille control |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Sean Budd <sean@nvaccess.org>
|
@LeonarddeR what are your thoughts on the known issues with this PR? |
Link to issue number:
Fixes #18004
Summary of the issue:
Currently, when controlling a remote computer via NVDA Remote Access, messages emitted via
ui.messageon the local computer are not displayed on the refreshable braille display. This is problematic because Remote Access outputs some status messages viaui.message, and this bug means that braille-only users are unable to perceive these messages.Description of user facing changes:
These messages are now shown in braille.
Description of developer facing changes:
None.
Description of development approach:
_pre_showBrailleMessage,_post_dismissBrailleMessageand_decide_disabledIncludesMessageextension points.BrailleHandler.messageto show a message ifenabledisFalseand_decide_disabledIncludesMessage.decide()is alsoFalse.ui.message, as detected by the aforementioned extension points.braille.handlerwhen showing a ui.message, as detected by the aforementioned extension points.ui.message, as these keys are used to pan through and dismiss the message.hostPendingNonmodifierattribute to_RemoteClient.client.RemoteClient, to track the non-modifier key of the toggle gesture.hostPendingNonmodifierfrom being sent.ui.messageshown by the local computer on keyboard or braille display input.Testing strategy:
Ensure that the "Controlling remote computer" message can be read and interacted with in braille.
Trigger local
ui.messagewhile controlling the remote computer (viawx.CallLaterin the NVDA Python Console), and ensure the message can be read and interacted with in braille. Did this with short and long messages (to ensure panning works).Performed these tests with "Show messages" set to "Use timeout", "Show indefinitely" and "Disabled" (in the latter case confirming that messages weren't shown).
Known issues with pull request:
The display contents changing on the remote computer does not cause the message to be dismissed. This is because we cannot tell the difference between a contentful display change, and something like the cursor flashing.
Some users may prefer the old behaviour. We could possibly make this configurable, though I think doing so may be premature since we don't know if users will want the option.
Code Review Checklist: