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

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

When something is moved from HTML to CSS you are saying that is not
necessary to understanding the page and it could be removed and the
content would keep its meaning.  You then indicate people can use
off-screen labels.  I'm concerned that people with disabilities that do
not use assistive technology (AT) will run into issues.   I could foresee
situations where visually there would be no label -- for example when data
is entered in the field.    Admittedly this is a problem for placeholder
in general and not just when it is CSS based.   WCAG sufficient techniques
also indicate field values can contain constraint information that may not
be part of the accessible label. This is similar to effect that
placeholder provides and both pose potential issues.

Examples of Success Criterion 3.3.2
A field for entering a date contains initial text which indicates the
correct format for the date.
http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html

Jonathan

-----Original Message-----
From: Ian Yang [mailto:ian@invigoreight.com]
Sent: Tuesday, April 30, 2013 7:06 AM
To: w3c-wai-ig@w3.org list
Subject: 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 12:46:45 UTC