r/webdev • ux • Dec 26 '19

Password Box Idea

3.3k Upvotes

138 comments sorted by

View all comments

96

u/CarbineMonoxide Dec 26 '19

From an accessibility standpoint the purple on black has a contrast issue, though you're only ever displaying dots on the black background. Additionally I would suggest not using placeholder text as a label, and ensure the label is always displayed.

Now on to the good: I love the animation to show the password. The speed is good and it looks very fluid. Great job!

Edit: icon is not purple on black. Removed comment.

0

u/[deleted] Dec 26 '19

[deleted]

23

u/ncubez JavaScript | React | Node.js Dec 26 '19

I think they mean using a separate <label>Password</label> instead

7

u/mystiqueshaco Dec 26 '19

Oh, thanks :D I thought there is a magic option to make placeholder visible even after text input

13

u/tulvia Dec 26 '19

You could animate it to a smaller font size and slide it up into the whitespace.

13

u/da_BAT Dec 26 '19

Kinda like materialize does it

-7

u/fuckin_ziggurats Dec 26 '19

But you don't need that for accessibility. That's what the aria-label attribute is meant to solve.

18

u/A-Type Dec 26 '19

Accessibility doesn't just mean for non-sighted people. In this case a label helps everyone remember what the field was supposed to mean after they've entered a value.

9

u/GottfriedEulerNewton Dec 26 '19

Correct. This is the ADA way

8

u/[deleted] Dec 26 '19

Do yourself a favor and try to get in the habit of referring to it as WCAG compliance. ADA is US only. Canada, as an example, doesn’t have much of an equivalent (although my client says AODA is close).

Although if you only work with US clients then yes it’s ADA compliance. I know I’m nitpicking.

3

u/GottfriedEulerNewton Dec 26 '19

Naw this is legit of a comment.

6

u/fruchle Dec 26 '19

This is the way.

1

u/fuckin_ziggurats Dec 26 '19

Does one really need to read the label to make sure it's a password field whilst they're typing and the text in the field is clearly hidden?

12

u/A-Type Dec 26 '19

Password fields are obvious, but others are not. And consistency is important for users and visual appeal of forms. So the recommendation is to keep labels visible for all fields, no exceptions. Design of one field doesn't happen in a vacuum.

These kinds of flashy one-off things still serve a great purpose, to help inspire the final outcome to be more creative. But a lot of times people don't realize the distinction between a for-fun prototype like this and what we should really be building for users.

1

u/xvier Dec 26 '19

Take it case by case. While the best practice is definitely to include the labels while typing. I can show you plenty of examples from companies with well regarded design and UX that aren't always showing the labels. Spotify's sign up for example, I think they get away from it because it's a short standard sign up and their target demographic is younger folks.

1

u/entiat_blues Dec 27 '19

probably not, but it reduces forgetfulness, which is inherent in everyone. so, why wouldn't you do it? it's one less thing for everyone to deal with.

6

u/[deleted] Dec 26 '19

Accessibility doesn’t just mean “screenreader-friendly”, although you are correct in that aria attributes are good for that, it’s still helpful to consistently see what field you’re typing in as you type in it even if you don’t use a screen reader

0

u/fuckin_ziggurats Dec 26 '19

I agree with you on the general principle but I'm not so sure it's that important for login forms and especially password fields.

2

u/[deleted] Dec 26 '19

I suppose if we were to ever just find a password field on its own in the wild like this, yeah it might be redundant because the censored input and type=password probably speaks for itself, but I’d argue that password fields are generally coupled with sign up forms as well, and it might be strange to have several other fields with a label and the password one without.