ginader / HTML5-placeholder-polyfill

Small and robust polyfill for the HTML5 placeholder attribut.
GNU General Public License v2.0
223 stars 85 forks source link

Allow label to wrap the input element #1

Closed iamnoah closed 12 years ago

iamnoah commented 12 years ago

It's perfectly valid for a label to wrap the input it labels and not have a for attribute (so no id is needed on the input).

I'm wondering why the label is needed at all though...

ginader commented 12 years ago

We need the label as I want Screenreaders to be able to read the placeholder info as well. Screenreaders in forms mode will only read out form elements (i.e. the content of label) but not anything else (i.e. content in a div or p).

Thanks for your enhancement. I will run some tests and then pull. Thanks! :-)