Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Automation in Windows Console: make speaking of passwords configurable #9649

Merged
merged 5 commits into from
Jun 5, 2019

Conversation

codeofdusk
Copy link
Contributor

Link to issue number:

Split from #9646 (builds on #9614).

Summary of the issue:

Currently, in consoles with UI Automation enabled:

  • When "speak typed characters" or "speak typed words" is enabled, typed text that is not displayed onscreen (such as passwords) is still reported.

Description of how this pull request fixes the issue:

When "speak passwords in UIA consoles" is disabled and one of "speak typed characters" or "speak typed words" is enabled, typedCharacter events are trapped and queued until a textChange event is received. In winConsoleUIA.event_textChange, typed characters are removed from the queue and typedCharacter events are fired. In winConsoleUIA.script_clear_isTyping, this queue is flushed. Since password prompts do not update the screen while the user is typing, no textChange events are received, so no typedCharacter events are fired and therefore no characters are announced.

Testing performed:

Tested password entry (by authenticating with ssh) on Windows 10 versions 1803 and 1903.

Known issues with pull request:

  • When "speak passwords in UIA consoles" is disabled and one of "speak typed characters" or "speak typed words" is enabled, typedCharacter events are only dispatched once textChange is received. This may introduce a small performance penalty.

See #9646 for all UIA console known issues to date.

Change log entry:

None.

@codeofdusk
Copy link
Contributor Author

@LeonarddeR
Copy link
Collaborator

For reference, may be you could elaborate on why passwords aren't spoken with the legacy implementation, and why this method does not work for UIA console?

@codeofdusk
Copy link
Contributor Author

For reference, may be you could elaborate on why passwords aren't spoken with the legacy implementation, and why this method does not work for UIA console?

The legacy console support implements "speak typed characters" by looking at the proximity of new text to the caret. If characters appear close to the caret, they are presumed to be typed characters and read out as such. While this prevents typed passwords (or other off-screen characters) from being announced, it leads to #513. The UIA console captures typed characters using keyboardHandler, which has no way of knowing whether a character actually caused the screen to update.

@michaelDCurran
Copy link
Member

Before merging this, I'd like to know whether you do notice a lag in speak typed characters when speak passwords is off?

@codeofdusk
Copy link
Contributor Author

codeofdusk commented Jun 3, 2019 via email

@michaelDCurran
Copy link
Member

You'll need to merge master into this branch and fix conflicts before I can merge this. Conflicts probably due to the merging of pr #9651

Copy link
Member

@michaelDCurran michaelDCurran left a comment

Choose a reason for hiding this comment

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

In gui/settingsDialogs.py:
You need to change both haveConfigDefaultsBeenRestored and restoreToDefaults methods on the advancedSettingsPanel class to handle your new setting.

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.

4 participants