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

Update Input password component layout to avoid password manager button overlap with visibility button #12398

Merged
merged 5 commits into from
May 2, 2022

Conversation

edmundito
Copy link
Contributor

What

Fixes #12202

This fixes an issue where a password manager's button would overlap with the password field's show/hide password button.

Before:
image

image

After:
image

image

How

Updates how the Input field is laid out. Instead of having the button overlap the input, the input is not split into two parts wrapped around a container.

Also added a unit test to test the behavior of the input component.

* Update layout to prevent password manager buttons from overlapping with visiblity button
* Apply consistent layout to both password and non-password inputs
@edmundito edmundito requested a review from a team as a code owner April 27, 2022 14:06
@github-actions github-actions bot added area/frontend area/platform issues related to the platform labels Apr 27, 2022
data-testid="input"
/>
{isVisibilityButtonVisible ? (
<VisibilityButton
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is an icon only button, could we still attach an aria-label to it with "Toggle password visibility" (or the like)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Udpated

* Fix type issues with testutils render
@edmundito edmundito merged commit 764b7d9 into master May 2, 2022
@edmundito edmundito deleted the fix-pwd-input-vis-btn branch May 2, 2022 13:46
suhomud pushed a commit that referenced this pull request May 23, 2022
…on overlap with visibility button (#12398)

* Update Input password component visibilty button
* Update layout to prevent password manager buttons from overlapping with visiblity button
* Apply consistent layout to both password and non-password inputs

* Add Input component unit test

* Update InputProps to interface

* Ensure input component can be assigned type

* Add aria label to visiblity button in password input
* Fix type issues with testutils render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External password generator button overlaps with "show password" button
3 participants