You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering whether others thought that the phrasing in the placeholder attribute definition around "a hint could be a sample value or a brief description of the expected format" is bad.
The placeholder attribute represents a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format... https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute
By bad, I mean it can lead developers into using data requirements in placeholder attributes.
The next sentence goes on to state how the placeholder attribute should not replace the label:
The placeholder attribute should not be used as an alternative to a label. For a longer hint or other advisory text, the title attribute is more appropriate.
However, I don't think that developers will read and and think "I shouldn't use placeholder attributes to convey data examples alone", but rather "I should use placeholder attributes to convey data examples along with a label identifying the field."
We know the landscape of forms and authors do rely on placeholder attributes to communicate data requirements. It would be great if the HTML spec led by example by educating the best uses of attributes.
The text was updated successfully, but these errors were encountered:
What is the issue with the HTML Standard?
I was wondering whether others thought that the phrasing in the
placeholder
attribute definition around "a hint could be a sample value or a brief description of the expected format" is bad.By bad, I mean it can lead developers into using data requirements in placeholder attributes.
The next sentence goes on to state how the placeholder attribute should not replace the label:
However, I don't think that developers will read and and think "I shouldn't use placeholder attributes to convey data examples alone", but rather "I should use placeholder attributes to convey data examples along with a label identifying the field."
We know the landscape of forms and authors do rely on placeholder attributes to communicate data requirements. It would be great if the HTML spec led by example by educating the best uses of attributes.
The text was updated successfully, but these errors were encountered: