Remove "placeholder" attribute from HTML and turn it into a CSS feature

I'm not sure if anyone has the same feeling, but imho I find
"placeholder" is more of a design/styling feature rather than a
meaningful part of the HTML content. Whether "placeholder"s exist or
not and the length of their values often depend on how a website is
designed.

>From accessibility's view point, "placeholder"s' values are often
unimportant. And they are never meant to be replacements of <label>
elements. Inputs fields should always be well described by
corresponding <label> elements. Even if designers decide to hide
<label> elements, developers should still ensure <label> elements are
properly presented to AT's users. Therefore AT's users are basically
fine without "placeholder" text being hard coded in HTML.

So the proposal here is removing "placeholder" attribute from HTML
spec, while turning it into a CSS feature. Like the following example:

input:placeholder {
    content: "Your name here";
    }

textarea:placeholder {
    content: "Lorem ipsum dolor sit amet...";
    }


Kind Regards,
Ian Yang

Received on Tuesday, 30 April 2013 11:07:00 UTC