ginader / HTML5-placeholder-polyfill

Small and robust polyfill for the HTML5 placeholder attribut.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work w/ hidden labels

yellowled opened this issue · comments

If a label is hidden in visual browsers (i.e. using H5BP's .visuallyhidden), the associated placeholder span disappears as well. Not sure if/how this is fixable.

Yes that's right. As .visuallyhidden is clipping the element the containing placeholder will disappear as well.

A workaround would be to not clip but to use the oldschool position:offscreen instead:

.offscreen {
left: -999px;
position: absolute;
}

I know it has some i18n implications though.

I'm looking into ways to approach the solution differently though which should solve that issue.