WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Placeholder instead of explicit label?

for

Number of posts in this thread: 8 (In chronological order)

From: Lynn Holdsworth
Date: Mon, Jan 05 2015 8:08AM
Subject: Placeholder instead of explicit label?
No previous message | Next message →

Hi all,

Is using a PLACEHOLDER attribute instead of a <label> tag enough to
satisfy WCAG2? I know that using a TITLE attribute is a sufficient
technique, but not sure about placeholders.

Thanks as always, Lynn

From: Jukka K. Korpela
Date: Mon, Jan 05 2015 8:19AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

2015-01-05, 17:08, Lynn Holdsworth wrote:

> Is using a PLACEHOLDER attribute instead of a <label> tag enough to
> satisfy WCAG2?

No. Even the HTML5 spefication, which defines the attribute, expresses
rather strongly that it should not be used as a replacement for a label.

> I know that using a TITLE attribute is a sufficient
> technique,

It isn’t. The great majority of users will not perceive anything in the
TITLE attribute, unless they mouse over the field.

Yucca

From: Jonathan Avila
Date: Mon, Jan 05 2015 8:25AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

> Is using a PLACEHOLDER attribute instead of a <label> tag enough to satisfy WCAG2? I know that using a TITLE attribute is a sufficient technique, but not



I would have concerns on relying on this attribute to provide a programmatic label because I consider it to be fallback content rather than a labeling attribute, however, the HTML to Platform Accessibility APIs Implementation Guide<http://www.w3.org/TR/html-aapi/>; indicates it is used in the accessible name calculation. It is likely not fully supported by assistive technology. Specifically to my knowledge it is not supported by speech recognition software.



In addition, I have concerns that SC 3.3.2 may not be met when the field contains data since the placeholder would not be shown.



Best Regards,



Jonathan



--

Jonathan Avila

Chief Accessibility Officer

SSB BART Group

= EMAIL ADDRESS REMOVED =

Phone 703.637.8957

Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter



-----Original Message-----
From: = EMAIL ADDRESS REMOVED = [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Lynn Holdsworth
Sent: Monday, January 05, 2015 10:08 AM
To: WebAIM Discussion List
Subject: [WebAIM] Placeholder instead of explicit label?



Hi all,



Is using a PLACEHOLDER attribute instead of a <label> tag enough to satisfy WCAG2? I know that using a TITLE attribute is a sufficient technique, but not sure about placeholders.



Thanks as always, Lynn

From: Jonathan Avila
Date: Mon, Jan 05 2015 8:27AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

> > I know that using a TITLE attribute is a sufficient technique,

> [Yucca wrote] It isn't. The great majority of users will not perceive anything in the TITLE attribute, unless they mouse over the field.

In my opinion title would pass SC 1.3.1 and SC 4.1.2 but not SC 3.3.2. That is -- it could be used as an accessible name but it is not a substitute for a visual label or instructions.

Jonathan

-- 
Jonathan Avila 
Chief Accessibility Officer
SSB BART Group 
= EMAIL ADDRESS REMOVED =
Phone 703.637.8957  
Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter


-----Original Message-----
From: = EMAIL ADDRESS REMOVED = [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Jukka K. Korpela
Sent: Monday, January 05, 2015 10:20 AM
To: = EMAIL ADDRESS REMOVED =
Subject: Re: [WebAIM] Placeholder instead of explicit label?

2015-01-05, 17:08, Lynn Holdsworth wrote:

> Is using a PLACEHOLDER attribute instead of a <label> tag enough to
> satisfy WCAG2?

No. Even the HTML5 spefication, which defines the attribute, expresses rather strongly that it should not be used as a replacement for a label.

> I know that using a TITLE attribute is a sufficient technique,

It isn't. The great majority of users will not perceive anything in the TITLE attribute, unless they mouse over the field.

Yucca

From: Jennifer Sutton
Date: Mon, Jan 05 2015 8:32AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

Greetings:

Here are a couple of articles about placeholders that you may find helpful:

Placeholder Attribute Is Not A Label! Web Axe
:
http://www.webaxe.org/placeholder-attribute-is-not-a-label/

and
Placeholders in Form Fields Are Harmful
http://www.nngroup.com/articles/form-design-placeholders/

Jennifer

From: Angela French
Date: Mon, Jan 05 2015 9:44AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

I am a sighted person who has long rallied against placeholder text for all the reasons illustrated in theNNGroup article.

-----Original Message-----
From: = EMAIL ADDRESS REMOVED = [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Jennifer Sutton
Sent: Monday, January 05, 2015 7:32 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Placeholder instead of explicit label?

Greetings:

Here are a couple of articles about placeholders that you may find helpful:

Placeholder Attribute Is Not A Label! Web Axe
:
http://www.webaxe.org/placeholder-attribute-is-not-a-label/

and
Placeholders in Form Fields Are Harmful
http://www.nngroup.com/articles/form-design-placeholders/

Jennifer

From: Lynn Holdsworth
Date: Mon, Jan 05 2015 10:29AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | Next message →

Thanks very much everyone. Looks like we're all on the same page.

I don't like seeing either a title or placeholder as a label
replacement, so knowing where I can fail either is great news for me -
if not for the developers of the site I'm auditing.

But there's definitely a school of thought that says title is
sufficient where the design can't accommodate an explicit, visible
label. Any thoughts on this?

Thanks again, Lynn

On 05/01/2015, Angela French < = EMAIL ADDRESS REMOVED = > wrote:
> I am a sighted person who has long rallied against placeholder text for all
> the reasons illustrated in theNNGroup article.
>
> -----Original Message-----
> From: = EMAIL ADDRESS REMOVED =
> [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Jennifer Sutton
> Sent: Monday, January 05, 2015 7:32 AM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] Placeholder instead of explicit label?
>
> Greetings:
>
> Here are a couple of articles about placeholders that you may find helpful:
>
> Placeholder Attribute Is Not A Label! Web Axe
> :
> http://www.webaxe.org/placeholder-attribute-is-not-a-label/
>
> and
> Placeholders in Form Fields Are Harmful
> http://www.nngroup.com/articles/form-design-placeholders/
>
> Jennifer
>
> > > messages to = EMAIL ADDRESS REMOVED =
> > > >

From: Jared Smith
Date: Mon, Jan 05 2015 10:56AM
Subject: Re: Placeholder instead of explicit label?
← Previous message | No next message

Lynn Holdsworth wrote:

> But there's definitely a school of thought that says title is
> sufficient where the design can't accommodate an explicit, visible
> label. Any thoughts on this?

This is only a viable option when there is a clear visual indication
as to what the function of the field is. Title alone on a text box,
for example, would never be suitable because, as Jukka noted, few
users would ever see it.

The function of a search field that is positioned on a page in a
manner consistent with search fields and that has a clearly identified
"Search" button adjacent to it would be apparent to sighted users. But
without adjacent "Search terms" text to associate as a label, the
field would still need an accessible name to be read to screen reader
users. In this limited case, title would be sufficient to provide this
accessible name. I, however, generally prefer using an off-screen
label instead.

Of note is that we shouldn't dissuade the use of placeholder in places
where it would be useful. We just shouldn't use it as an alternative
for a proper label.

See the webaim.org site. Our search field is visually distinctive, yet
the text box does not have adjacent label text. We instead use both
placeholder (to reinforce the function of the field for sighted users)
and an off-screen label (for screen reader users) to clearly indicate
the function of this field.

Jared