-
Notifications
You must be signed in to change notification settings - Fork 167
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
"Placeholder" attribute for text-based inputs #202
Comments
It can; but placeholders MUST NOT be used as replacements for labels - ie, infield labels. Placeholders, by spec (and for a11y/UX) must only be example input - there must always be a label visible the entire time one is typing into the field. "Please enter your full name:" is label text, not placeholder text. |
So something like this would be better instead of what I initially described?
produces:
|
Yes, totally - altho I'd say "full name" doesn't really need a placeholder :-) it's more useful for things like date fields, when you'd want the placeholder to show the example syntax for dates you expect. |
So, is the placeholder attribute supported by these types of inputs? I tried it out and wasn't able to emulate that functionality. Is there any other of populating the |
It should be supported on anything that takes text input. I'm happy to add this functionality, but first I wanted to clear up what the proper purpose of placeholders is :-) |
I noticed the
textarea
widget has aplaceholder
attribute for showing some text before any text is actually input (using the HTMLplaceholder
input attribute). Can this functionality be extended to other text-based inputs (fields.string
,fields.email
,fields.password
,fields.number
) as well? For example:produces:
The text was updated successfully, but these errors were encountered: