Re: Issues with HTML5 placeholder and related Accessibility API mappings

On 19 March 2015 at 19:16, Bryan Garaventa <bryan.garaventa@ssbbartgroup.com
> wrote:

> The issue being that many see placeholder as a label substitute, which is
> an incorrect assumption, even though the spec seems to imply that this is
> true.
>

The placeholder like the title is used as a value when no better value is
provided using the recommended methods, the spec does not imply that it an
author should use it as a label, but does imply that user agents use it as
a possible source for a label. The API mapping spec is for UA implementers,
not authors.



>
> Technically the concept of placeholder is to provide hint text in the
> place where the value is to be entered, as a temporary 'place holder' for
> the value of that field, not as a label for that field.
>

agreed

>
> When placeholder is used as a label however, it is temporary and
> disappears when a user interacts with the field, rendering this as useless
> as a visual label, which presents cognitive accessibility issues for some
> users, and presents additional issues for non-sighted AT users.
>

agreed,  and thus the advice present in the HTML5 spec

>
> As such, it seems logical to me to treat placeholder as a temporary field
> value in the accessibility tree when there is no actual value present on
> the edit control, because it's acting as a place holder value, which would
> have no impact if the form was submitted because it still wouldn't exist in
> the DOM as the value of that field.
>

Disagree, as is regularly the case where the ONLY source of an accessible
name for a control is placeholder text, an unfortunate reality.

which would have no impact if the form was submitted because it still
> wouldn't exist in the DOM as the value of that field.
>

placeholder never exists in the DOM as the value of the field as far as I
know it is always present as the value of the placeholder attribute i the
DOM (if present).

I have grepped some placeholder usage example data from a random selection
of 10,000 html files,  note its a big HTML file (3.8 mb)  and the output is
crappy HTML.
http://www.html5accessibility.com/HTML5data/placeholder-usage.html




--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>

Received on Saturday, 21 March 2015 11:25:55 UTC