cfpb / design-manual

⚠️ THIS REPO IS DEPRECATED ⚠️ A set of design principles and standards for the Consumer Financial Protection Bureau.
https://cfpb.github.io/design-manual/
Creative Commons Zero v1.0 Universal
98 stars 71 forks source link

Placeholder js #364

Closed cfarm closed 7 years ago

cfarm commented 9 years ago

Older browsers that don't support the placeholder attribute need JavaScript to make our placeholders the default value.

Currently the Design Manual has no such JS so text input examples are just empty:

image

cfarm commented 9 years ago

Here's an example from Owning a Home https://github.com/cfpb/owning-a-home/blob/master/src/static/js/modules/placeholder-polyfill.js

caheberer commented 7 years ago

@cfarm is this still an issue? Or is it addressed with the new form fields work?

jimmynotjim commented 7 years ago

We've stopped sending JS to IE8 in cfgov-refresh. We should probably ensure we're using proper labels and let placeholder support fall where it may. Not sure if that should be explored here or this issue can be closed.

Scotchester commented 7 years ago

I agree with @jimmynotjim. Placeholder text should be considered a progressive enhancement that we can do without if it's not supported by the browser.