W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2013

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

From: Ian Yang <ian@invigoreight.com>
Date: Tue, 30 Apr 2013 19:06:30 +0800
Message-ID: <CABr1FsevswhMqY7q7Vi1Hq4yohZEg12Q89Q__yVk+MXPza613w@mail.gmail.com>
To: "w3c-wai-ig@w3.org list" <w3c-wai-ig@w3.org>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:48 UTC