WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 2 months ago

#48222 new defect (bug)

"Show password" button overlaps with the LastPass icon

Reported by: SergeyBiryukov Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.3
Component: Login and Registration Keywords: has-screenshots has-patch needs-refresh
Focuses: ui Cc:

Description

The new "Show password" button added to login screen in [46256] overlaps with the LastPass extension icon. Tested with Google Chrome 77 on Windows 10.

This only happens on Log In and Reset Password screens. The Edit User screen is OK, as the button there is separate from the input.

Attachments (23)

48222.login-screen.PNG (7.4 KB) - added by SergeyBiryukov 12 months ago.
48222.reset-password-screen.PNG (13.1 KB) - added by SergeyBiryukov 12 months ago.
48222.edit-user-screen-ok.PNG (7.6 KB) - added by SergeyBiryukov 12 months ago.
48222.diff (373 bytes) - added by sabernhardt 12 months ago.
moves button from the (right) edge when input has background-image in style
patch-login-show-password-button-lastpass.png (4.9 KB) - added by sabernhardt 12 months ago.
login form after patch
Sign in - Google Accounts 2019-10-06 07-08-00.jpg (61.8 KB) - added by adamsilverstein 12 months ago.
google sign in
Image 2019-10-06 at 7.09.53 AM.png (26.8 KB) - added by adamsilverstein 12 months ago.
Log In ‹ Develop WordPress Title — WordPress 2019-10-06 07-19-24.jpg (32.5 KB) - added by adamsilverstein 12 months ago.
login with data-lpignore="true" in password field
48222.2.diff (1.6 KB) - added by adamsilverstein 12 months ago.
data-lpignore="true" approach
48222.3.diff (368 bytes) - added by sabernhardt 12 months ago.
simplest option: only adding min-width to password input
login-simple-min-width-firefox.png (8.0 KB) - added by sabernhardt 12 months ago.
simplest option in Firefox (min-width)
48222.4.diff (1.1 KB) - added by sabernhardt 12 months ago.
"fake input" option with border on container and larger input areas for login
fake-input-lastpass-edge.png (10.5 KB) - added by sabernhardt 12 months ago.
"fake input" option in Edge, with LastPass icons
48222 Safari LastPass.png (47.7 KB) - added by afercia 12 months ago.
See the Safari "key" icon on the username field.
lastpass-chrome-macos-20200116.jpg (64.7 KB) - added by valentinbora 9 months ago.
Test of the login form with patch 48222.4.diff on Chrome/LastPass
Screen Shot 2020-02-07 at 9.17.22 AM.png (11.3 KB) - added by garrett-eclipse 8 months ago.
Move the eye outside of the input
48222-password-ideas.png (13.7 KB) - added by valentinbora 8 months ago.
Some more layout ideas so we have options to choose from
Screen Shot 2020-02-17 at 9.58.10 PM.png (25.9 KB) - added by valentinbora 8 months ago.
Desktop alignment and sizing of latest design with button in line with Password label
Screen Shot 2020-02-17 at 10.02.29 PM.png (28.3 KB) - added by valentinbora 8 months ago.
Reset password screen alignment and sizing of latest design with button in line with Password label
48222.5.diff (3.5 KB) - added by valentinbora 8 months ago.
Implementation redone based on design feedback, button above field in line with label
48222 focus style.png (23.7 KB) - added by afercia 7 months ago.
Focus style from 48222.5.diff​
48222.6.png (52.8 KB) - added by valentinbora 7 months ago.
Screenshots of login and reset password forms with show/hide button underneath input control
48222.6.diff (4.5 KB) - added by valentinbora 7 months ago.
Show/hide password button underneath input control with full length label

Download all attachments as: .zip

Change History (68)

#1 @SergeyBiryukov
12 months ago

  • Focuses ui added

@sabernhardt
12 months ago

moves button from the (right) edge when input has background-image in style

@sabernhardt
12 months ago

login form after patch

#2 @sabernhardt
12 months ago

The patch checks for a background image in the password input's style attribute. If it finds one, the show password button moves over by 40 pixels.

#3 @johnbillion
12 months ago

How do services that use the "show" button such as Facebook, Google, and WordPress.com handle this?

#4 @adamsilverstein
12 months ago

Attaching some screenshots of the Google account login screen.

Here, the show password icon looks like it is in the right hand edge of the input - in fact, its outside the input entirely and uses a merged borderless edge to make it appear as part of the field.

#5 @adamsilverstein
12 months ago

One other potential option would be to disable the lastpass icon for the password field by adding data-lpignore="true". I verified this works and that I can still fill in both fields using the icon visible in the user_name field.

@adamsilverstein
12 months ago

login with data-lpignore="true" in password field

@adamsilverstein
12 months ago

data-lpignore="true" approach

#6 @sabernhardt
12 months ago

I tested the second patch in Edge, IE11, Opera 63, Firefox 69 and Chrome 77 on Windows 10. I had no trouble populating the two fields with LastPass when clicking the icon inside the Username/Email input or when using the show/hide button. It looks cleaner than my option, and I'm not sure having a clickable LastPass icon in the Password field is necessary after the previous field.

#7 @Clorith
12 months ago

LastPass being just one of many password managers, I would be more inclined to take the route of the other big players out there; a "fake" part of the input with no left border as noted in comment:4 would be more forward-compatible as well with whatever new services may pop up.

#8 @garrett-eclipse
12 months ago

I would also agree with the fake portion of the input. OR moving the icon up beside the 'Password' label so it's not directly in the input itself.

#9 @davidbaumwald
12 months ago

  • Keywords dev-feedback added

I agree with the "faking" of an extended input as well, instead of chasing an unknown number of vendor-specific workarounds.

@sabernhardt
12 months ago

simplest option: only adding min-width to password input

@sabernhardt
12 months ago

simplest option in Firefox (min-width)

@sabernhardt
12 months ago

"fake input" option with border on container and larger input areas for login

@sabernhardt
12 months ago

"fake input" option in Edge, with LastPass icons

#10 @sabernhardt
12 months ago

  • Keywords has-patch needs-testing added

I included a simpler option of only the min-width because that should not require much testing.

For the "fake input" option, I tested in various PC browsers as well as at different zoom levels and with a larger text size. That still leaves plenty of other testing (including High Contrast Mode).

This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.


12 months ago

#12 @afercia
12 months ago

For the records, this was noted also on the Show Password ticket. See:
https://core.trac.wordpress.org/ticket/42888#comment:24
https://core.trac.wordpress.org/ticket/42888#comment:45

That said, I'm not sure WordPress should necessarily remediate to poor implementations by external software. It appears to me Lastpass should make a better job and take padding into consideration. I'd lean towards reporting upstream.

#13 @davidbaumwald
12 months ago

  • Milestone changed from 5.3 to Future Release

With 5.3 RC1 releasing today, this is being moved to Future Release. If any committer feels this can be worked in quickly for 5.3 or can assume ownership in 5.4, feel free to move it back up.

#14 @johnbillion
12 months ago

  • Milestone changed from Future Release to 5.3.1

#15 @afercia
12 months ago

@johnbillion what are your thoughts on reporting upstream to LastPass? Seems to me LastPass should do a better job and its icon placement seems arguable. It also conflicts with native browsers UI. See for example Safari in th screenshot below. I think this also applies to Edge.

@afercia
12 months ago

See the Safari "key" icon on the username field.

#16 @johnbillion
12 months ago

Observation: google.com and facebook.com both place the view button outside of the input (with a fake focus border). wordpress.com uses the padding method that core is using.

This ticket was mentioned in Slack in #forums by sterndata. View the logs.


11 months ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


10 months ago

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


10 months ago

#21 @audrasjb
10 months ago

  • Keywords needs-design needs-design-feedback added
  • Milestone changed from 5.3.1 to 5.4

Hi,

48222.4.diff is a nice workaround, but I'm wondering about implementing a fake input since focus outline looks very strange to me… and this will be the rendering for all users, even those who don't use LastPass or so.

Adding needs-design/needs-design-feedback workflow keyword and moving it to 5.4 as it doesn't sounds realistic for 5.3.1 which is planned this week.

Last edited 10 months ago by audrasjb (previous) (diff)

#22 @sabernhardt
10 months ago

Yes, the fake input option could be better, so I agree to reconsider this for a later version. And it looks stranger in High Contrast Mode. Wrapping the username input with a similar container div might be a good start to improving it, though I'm not sure how yet.

Another consideration: the icon for Norton's Password Manager also overlaps.

@valentinbora
9 months ago

Test of the login form with patch 48222.4.diff on Chrome/LastPass

#23 @fahimmurshed
8 months ago

Hi,

I have checked that, this issue is not solved yet.
https://i.imgur.com/fHtA9Jf.png

I have modified this file /wp-admin/css/login.min.css

Change the padding

    padding: 0px 45px;

CSS code:

.login .button.wp-hide-pw {
    background: 0 0;
    border: 1px solid transparent;
    box-shadow: none;
    font-size: 14px;
    line-height: 2;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0px 45px;
    position: absolute;
    right: 0;
    top: 0;
}

It should look like this
https://i.imgur.com/SyJR41t.png

#24 @xkon
8 months ago

Usually any additional icons are added as a background image from extensions from what I've seen in general.

In a similar way to one of @sabernhardt early patches and the later of @fahimmurshed , instead of moving the eye icon we can force any background image to a different position.

As an example an addition like this to login.css would push the LastPass icon further on the left side instead.:

.login input#user_pass {
	background-position: 85% !important;
}

This is a simple solution imho that doesn't change the current input in any way and also avoids the confusion of the focused element not being in "full width".

Last edited 8 months ago by xkon (previous) (diff)

#25 @sabernhardt
8 months ago

@fahimmurshed and @xkon: I like the idea of a simpler option. Unfortunately, moving the LastPass background image does not change the clickable area's position (behind the show/hide eye button). And the clickable area would be covered by the button with an increased padding, too.

I considered a right margin instead of padding, but then the eye button would cover the long passwords WordPress suggests (the first patch here has the same problem).

#26 @afercia
8 months ago

It's a bit unfortunate LastPass doesn't add anything to reliably target with CSS the fields it applies a background image to. the only option would be something like:

.login input[type="password"][style^="background-image"] { ... }

which is a bit crazy. Still thinking that LastPass should do a better job and the issue should be fixed upstream.

@garrett-eclipse
8 months ago

Move the eye outside of the input

#27 @garrett-eclipse
8 months ago

Random thought, could we just move the eye outside of the input to avoid the conflict all together?
https://core.trac.wordpress.org/raw-attachment/ticket/48222/Screen%20Shot%202020-02-07%20at%209.17.22%20AM.png

@valentinbora
8 months ago

Some more layout ideas so we have options to choose from

#28 follow-up: @karmatosed
8 months ago

Of any of these, the 2nd one would be my preference showing the eye and 'show password' underneath.

#29 @fahimmurshed
8 months ago

Both are awesome
https://i.imgur.com/P6GvV7o.png

#30 in reply to: ↑ 28 @afercia
8 months ago

Replying to karmatosed:

Of any of these, the 2nd one would be my preference showing the eye and 'show password' underneath.

I'd agree. I'd just consider to make the clickable area a bit bigger.

@karmatosed would you prefer to further discuss with the design team or can the needs-design and needs-design-feedback keywords be removed?

#31 @karmatosed
8 months ago

  • Keywords needs-design removed

I would like to see it in a PR before totally looping design out of this. Let's remove the needs-design and keep design feedback keyword.

#32 @valentinbora
8 months ago

@karmatosed looking back at it after a couple of days rest, does the link need to have such high contrast (i.e. be so prominent)? I'd personally vote for turning it down a notch. Thoughts?

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


8 months ago

#34 @nrqsnchz
8 months ago

I think that @valentinbora's mockups are great. I particularly like these two (option 1 and 2):

https://cldup.com/cfboSj_iwr.png

The label "Show password" is more obvious, easier to understand than just the icon.

I'm also more inclined to the first version, where the label is above the field. In my opinion it is easier to see.

looking back at it after a couple of days rest, does the link need to have such high contrast

@valentinbora I think the contrast is fine.

#35 @karmatosed
8 months ago

  • Keywords needs-design-feedback removed

#36 @karmatosed
8 months ago

I agree the contrast is fine for me. I think it would be great to get this into trunk and see what we think there. Thanks, everyone for the great work involved so far.

#37 @paaljoachim
8 months ago

I think the above option 1 in Enrique's post where the show password (I think both words need to begin with capital letters) is on the same line as Password bring better symmetry and balance in the overall image. The eye moves along the top border line from Password over to Show Password.

Option 2. Brings a stronger contrast where the eye needs to move from the Password text then down right across the password box to the show password.

Option 1 is easier on the eyes.

@valentinbora
8 months ago

Desktop alignment and sizing of latest design with button in line with Password label

@valentinbora
8 months ago

Reset password screen alignment and sizing of latest design with button in line with Password label

@valentinbora
8 months ago

Implementation redone based on design feedback, button above field in line with label

#38 follow-up: @Clorith
7 months ago

I'm not a fan of the markup here, to reach the button to toggle visibility one would then have to navigate backwards, and would also be exposed to a potentially contextless "Show" before even being presented with the input.

The toggle button needs its old label of Show password, we don't know what direction the user reaches the button, so retaining the context within the label is important.

The button should also be moved to come after the input form, you can still use CSS for positioning, but markup needs to follow a natural pattern.

#39 @valentinbora
7 months ago

@Clorith there seems to be some divergence between your feedback and #design (@melchoyce recommended the shorter label due to potential i18n constraints with longer verbiage in some languages). Please refer to https://wordpress.slack.com/archives/C02S78ZAL/p1581966078468900

Also, @nrqsnchz commented (see Slack link above) re. a11y for the button to be right after the label for context.

@Clorith please help out for reaching consensus here, then we can tune the code accordingly.

#40 in reply to: ↑ 38 @afercia
7 months ago

  • Keywords needs-refresh added; dev-feedback needs-testing removed

Replying to Clorith:

I'm not a fan of the markup here, to reach the button to toggle visibility one would then have to navigate backwards, and would also be exposed to a potentially contextless "Show" before even being presented with the input.

I agree with @Clorith.
UI controls need to make sense also when read out of context. A contextless "Show" would be the equivalent of a "Read more" link that doesn't specify the "what".

Re: the order: many users experience the content in a linearized way. Keyboard users, screen reader users, etc. The order of elements needs to be logical: first the "what", and then the actions related to the "what" object.

The option 2 on comment:34 is the only one that satisfies these needs.

Also, looking at 48222.5.diff :

  • there's a missing semicolon in wp-login.php at line 968 which throws a PHPCS error: <?php _e( 'Hide' ) ?>
  • the CSS class button-secondary is deprecated and can be removed: it's a pre-existing issue but since we're here... See [38672].

#41 @afercia
7 months ago

Looking a bit more in depth:

  • as mentioned in a previous comment, the clickable area is a bit too small: we're down from the previous 40 by 40 pixels to 50 by 20 pixels: the height is too small especially for touch on small screens, not to mention accessibility
  • the focus style could be improved a bit (see screenshot below)
  • as there's now visible text, there's no need to have an aria-label: it should be removed together with the JS part meant to update its value
  • some CSS values seem a bit "magic numbers", for example line-height: 2.15; based on font-size: 12px; computes to 25.8 pixels: it would be nice to have some meaningful numbers instead (with no decimals)
  • on button activation, the icon updates but the visible text doesn't and it's always "Show"
Last edited 7 months ago by afercia (previous) (diff)

@afercia
7 months ago

Focus style from 48222.5.diff​

#42 @valentinbora
7 months ago

Alright, thanks for chiming in.

Next steps:

  1. Move button below input control
  2. Revert to full label to include the noun "password" (translated length will no longer be an issue due to new location)
  3. Update text to Show or Hide based on state via JS
  4. Increase button height
  5. Code style fixes

@valentinbora
7 months ago

Screenshots of login and reset password forms with show/hide button underneath input control

@valentinbora
7 months ago

Show/hide password button underneath input control with full length label

#43 @valentinbora
7 months ago

@afercia @Clorith patch updated per your request.

Please review and share feedback. Thanks!

#44 @audrasjb
7 months ago

  • Milestone changed from 5.4 to Future Release

Hi,

With 5.4 Beta 3 approaching and the Beta period reserved for bugs introduced during the cycle, this is being moved to Future Release. If any maintainer or committer feels this should be included or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#45 @bobeaston
4 months ago

Have we forgotten this one?

Note: See TracTickets for help on using tickets.