Do not interrupt Remote Access status messages when executing from the NVDA Menu (#18070)
Closes #17947
Supersedes #17991
Summary of the issue:
When executing some Remote Access actions via the Remote Access submenu
in the NVDA menu, the status is interrupted by the focus changing,
making the messages useless.
Description of user facing changes
Remote Access actions performed via the NVDA menu should now correctly
report their status.
Description of development approach
- Add a `delayedMessage` function to `ui`, based on the approach taken
for focusing open blocking modals in #17582.
- Remove the now duplicated code, and replace it with a call to
`ui.delayedMessage`.
- In `_remoteClient.client.RemoteClient`, updated `copyLink`,
`pushClipboard`, and `toggleMute`, to use `ui.delayedMessage` instead of
`ui.message`, as these methods can be envoked directly from the menu.
- Also moved the success message out of
`globalCommands.GlobalCommands.script_copyRemoteLink` into
`_remoteClient.client.RemoteClient.copyLink`.
- Updated `_remoteClient.cues._playCue` to use `ui.delayedMessage`
instead of `ui.message`, as the "Disconnect" menu item causes a cue to
be issued. This means that cues should work even if issued at the same
time as a UI change, and should have very little performance impact.
Testing strategy:
- Performed the above listed commands with and without a Remote Access
session in progress.