WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Placeholder and Accessible Name Computation

for

From: Sailesh Panchang
Date: May 8, 2019 2:34PM


The HTML 5 specs have always maintained:
The placeholder attribute represents a short hint (a word or short
phrase) intended to aid the user with data entry when the control has
no value.
The placeholder attribute should not be used as a replacement for a
<label>. For a longer hint or other advisory text, place the text next
to the control.
https://www.w3.org/TR/html5/sec-forms.html#the-placeholder-attribute
Also see
https://lists.w3.org/Archives/Public/w3c-wai-gl/2014OctDec/0030.html
Thanks,
Sailesh


On 5/8/19, Jonathan Avila < <EMAIL REMOVED> > wrote:
> I am generally opposed to the placeholder being used as the accessible name
> because I believe it will lead to the sole use of it as an accepted way of
> providing a name rather than a fallback. The placeholder should not act as
> a label and should act as a hint. By including it in the name it encourages
> it's acceptance as a label rather than a placeholder. It's called
> placeholder for a reason and not a label.
>
> Would we accept the src of an image as fallback content for the alternative
> text of an image if no alt text was provided? What about the name attribute
> of an iFrame if no title or aria-label was provided?
>
> Jonathan
>
>