Skip to content

Accessibility overlay support for username field and scroll tracking#700

Merged
kspearrin merged 3 commits intomasterfrom
feature-acc-usernamefield
Jan 13, 2020
Merged

Accessibility overlay support for username field and scroll tracking#700
kspearrin merged 3 commits intomasterfrom
feature-acc-usernamefield

Conversation

@mpbw2
Copy link
Copy Markdown
Contributor

@mpbw2 mpbw2 commented Jan 13, 2020

No description provided.

return;
}

var isUsernameEditText = AccessibilityHelpers.IsUsernameEditText(root, e);
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.

I am afraid this is going to cause perf issues. Can we limit this to my specific cases instead of on every event?


public static bool IsSameNode(AccessibilityNodeInfo info1, AccessibilityNodeInfo info2)
{
if(info1 != null && info2 != null) {
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.

formatting

{
Point point = null;
var allEditTexts = GetWindowNodes(root, e, n => EditText(n), false);
foreach(AccessibilityNodeInfo node in allEditTexts)
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.

var

}

var isUsernameEditText = AccessibilityHelpers.IsUsernameEditText(root, e);
var isPasswordEditText = e.Source != null && e.Source.Password;
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.

You can leave this as is since it is probably more readable, but just wanted to show you some c# shorthand: var isPasswordEditText = e.Source?.Password ?? false

break;
}
if(e.PackageName == BitwardenPackage)
if (e.EventType == EventTypes.ViewScrolled)
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.

formatting


System.Diagnostics.Debug.WriteLine(">>> Accessibility Overlay View {0} X:{1} Y:{2}",
updateView ? "Updated to" : "Added at", layoutParams.X, layoutParams.Y);
Point anchorPosition = AccessibilityHelpers.GetOverlayAnchorPosition(_anchorViewHash, root, e);
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.

var

@kspearrin kspearrin merged commit d0ba4b6 into master Jan 13, 2020
@mpbw2 mpbw2 deleted the feature-acc-usernamefield branch January 13, 2020 22:50
vvolkgang pushed a commit that referenced this pull request Jun 20, 2024
vvolkgang pushed a commit that referenced this pull request Jun 20, 2024
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.

2 participants