WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Re: Label vs ALT tag on form elements

for

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

From: Keith Parks
Date: Wed, Mar 21 2007 9:30AM
Subject: Re: Label vs ALT tag on form elements
No previous message | Next message →

On Mar 21, 2007, at 9:20 AM, Keith Parks wrote:

> Our university recently purchased the AccCerify

D'oh!

That's AccVerify...

******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

A riddle wrapped in a mystery inside an enigma, served with a side of
slaw.

From: Patrick Lauke
Date: Wed, Mar 21 2007 9:40AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

> Tim Beadle

> AFAIK, alt is not a valid attribute for any element apart from <img>.

It's listed as a valid attribute for inputs etc in the xhtml 1.0 strict dtd. I'd be more concerned about user agent / AT support, and have to admit that I know nothing on that subject. Anybody want to do a little case study/test with JAWS and co?

P

From: Derek Featherstone - furtherAhead.com
Date: Wed, Mar 21 2007 9:50AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Keith wrote:
>So what's the scoop on ALT tags for form elements?

As far as I am aware, the alt attribute for a form field is to provide an alernate for user agents that either don't support that particular form control or (perhaps) the scenario where that support is turned off - much the same way as alt serves that purpose for images.

I believe it has some support in AT for input type=image as a screen reader will read that alt text if present. Not sure of any support outside that.

Cheers,
Derek.
--
Derek Featherstone = EMAIL ADDRESS REMOVED =
Further Ahead

From: Alastair Campbell
Date: Wed, Mar 21 2007 10:00AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Derek wrote:
> I believe it has some support in AT for input type=image


D'oh! I should have looked it up, it's not for type=button at all (my
previous email), that function would be from the 'value'.

I suspect that's all the tool was referring to, making an allowance for
inputs with that type, rather than any alternative labelling mechanism.

Kind regards,

-Alastair

--
Alastair Campbell | Director of User Experience

Nomensa Email Disclaimer:
http://www.nomensa.com/email-disclaimer.html

From: Alastair Campbell
Date: Wed, Mar 21 2007 10:10AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Keith Parks wrote:
"their Form Repair Utility gives the
option of either applying a LABEL to form inputs, or alternatively
applying a ALT tag."

I assume it said alt *attribute*?

I thought it was just for type="button" inputs where you don't
need/can't use a label?

Kind regards,

-Alastair

--
Alastair Campbell | Director of User Experience

Nomensa Email Disclaimer:
http://www.nomensa.com/email-disclaimer.html

From: Keith Parks
Date: Wed, Mar 21 2007 10:20AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On Mar 21, 2007, at 9:39 AM, Alastair Campbell wrote:

> Keith Parks wrote:
> "their Form Repair Utility gives the
> option of either applying a LABEL to form inputs, or alternatively
> applying a ALT tag."
>
> I assume it said alt *attribute*?

Yes. Pardon my sloppy language.

> I thought it was just for type="button" inputs where you don't
> need/can't use a label?

I only saw the training demo yesterday. Haven't started using the
product yet, so I may have been confused.

Hopefully the options/purpose will be clear when I get it installed
and running.


******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

A riddle wrapped in a mystery inside an enigma, served with a side of
slaw.

From: Robert Yonaitis
Date: Wed, Mar 21 2007 10:30AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Derek
i agree with this point you brought up to the list as well:

I believe it has some support in AT for input type=image as a screen reader will read that alt text if present. Not sure of any support outside that.


cheers






The information in this transmittal (including attachments, if any) is privileged and confidential and is intended only for the recipient(s) listed above. Any review, use, disclosure, distribution or copying of this transmittal is prohibited except by or on behalf of the intended recipient. If you have received this transmittal in error, please notify me immediately by reply email and destroy all copies of the transmittal. Thank you.

From: Robert Yonaitis
Date: Wed, Mar 21 2007 10:40AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Keith ,

that is a great question

The guidence provided by the access board is clear that as long as nothing seperate the text/inputs and the completion of the form. So it could. I think you said you are getting training on this and your tool. If I read right it is AccVerify. This is a specific part of basic training and can of course be demonstrated.

So to answer your question in a common way: Possibly. However, I would recommend using labels. Whenever I get out for a training it is what I recommend :)

I hope this helps keith


cheers
rob yonaitis

From: Robert Yonaitis
Date: Wed, Mar 21 2007 10:50AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Hello Jared:

Contact the people at the access board, these are the people to talk to. they asked specifically that we recognize that. I was specifically discussing 508 not WCAG 1 P1-3 or the WCAG 2.0 future


Cheers,
Rob

From: Jared Smith
Date: Wed, Mar 21 2007 11:00AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On 3/21/07, Robert Yonaitis wrote:
> For section 508 N Labels are required if It is anything except for
> - Text / form element with nothing in between the preceding text and element

Do you have a reference for this? That's certainly not what the
language of Section 508 specifies. The Access Board may have some
supporting documentation that allows this, but I certainly would not
recommend leaving out the label just because the elements are adjacent
to each other or in some particular order. Doing so would also be a
violation of WCAG (of note, WCAG 2.0 requires explicit association
using for and id).

And to clarify, in HTML, alt is allowed only on img, area, applet, and
input. I had always thought that alt was only allowed on input
type="image", but this does not seem to be the case in the spec. In
any case, alt on any other type of input doesn't seem to do anything
in either browsers or assistive technologies. As such, the approach of
using alt on anything other than input type="image" seems a bit
pointless to me.

Jared Smith
WebAIM.org

From: Keith Parks
Date: Wed, Mar 21 2007 11:10AM
Subject: Label vs ALT tag on form elements
← Previous message | Next message →

Hi folks.

Following on recent threads about hidden labels for form inputs, and
(I think?) a question about multiple inputs sharing the same label,
I was wondering about the use of an ALT tag on an input as a way of
communicating its function.

Our university recently purchased the AccCerify and AccRepair
products from HISoftware, and their Form Repair Utility gives the
option of either applying a LABEL to form inputs, or alternatively
applying a ALT tag.

I'd never heard of the ALT tag approach, but it would seem helpful
for those situations where the same LABEL would logically apply to
multiple elements (thus creating the need for "hidden" labels), or
the situation where the on-screen text doesn't provide particularly
clear or concise wording for a label.

So what's the scoop on ALT tags for form elements?

Thanks,

Keith

******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

(Objects on your screen may be closer than they appear)


From: Keith Parks
Date: Wed, Mar 21 2007 11:20AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On Mar 21, 2007, at 9:32 AM, Robert Yonaitis wrote:

> For section 508 N Labels are required if It is anything except for
> - Text / form element with nothing in between the preceding text
> and element
>
> example
>
> Name [ field ] [submit]
>
> According to the access board you do not need an alternative!
> amazing I know but anything besides this does require the label
> for form handling.

Does the above apply only to a form with a *single* input, or would
it also be acceptable if the pattern followed over multiple inputs,
like...

name [field]
street address [field]
city [field]
state [field]
telephone [field]


******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

A riddle wrapped in a mystery inside an enigma, served with a side of
slaw.

From: Tim Beadle
Date: Wed, Mar 21 2007 11:30AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On 21/03/07, Keith Parks < = EMAIL ADDRESS REMOVED = > wrote:
> So what's the scoop on ALT tags for form elements?

AFAIK, alt is not a valid attribute for any element apart from <img>.

Tim

From: Robert Yonaitis
Date: Wed, Mar 21 2007 11:40AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

For section 508 N Labels are required if It is anything except for
- Text / form element with nothing in between the preceding text and element

example

Name [ field ] [submit]

According to the access board you do not need an alternative! amazing I know but anything besides this does require the label for form handling.

So for form handling yes please use labels and it is what is recommended by the tool documentation "AccVerify"


Does this help?

best regards,
rob

From: Jukka K. Korpela
Date: Wed, Mar 21 2007 11:50AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On Wed, 21 Mar 2007, Derek Featherstone - furtherAhead.com wrote:

> As far as I am aware, the alt attribute for a form field is to provide
> an alernate for user agents that either don't support that particular
> form control or (perhaps) the scenario where that support is turned off
> - much the same way as alt serves that purpose for images.

The relevant specification at
http://www.w3.org/TR/html401/struct/objects.html#adef-alt
describes things along such lines, but it's really just babbling. The real
story is that the alt attribute for <input> was introduced (and has been
implemented) for the case <input type="image" ...> only.

> I believe it has some support in A[L]T for input type=image as a screen
> reader will read that alt text if present. Not sure of any support
> outside that.

Graphic browsers generally use the alt attribute value when the image
cannot be retrieved or the browser has been instructed not to show images.
Text-only browsers use it too. However, support has not been quite
universal, so the traditional wisdom is to say the same thing in three
ways, using three attributes that might be used by different browsers as
the alternate text, e.g.

<input type="image" name="Search" value="Search" alt="Search">

Of course, a normal submit button is still better for accessibility.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

From: Robert Yonaitis
Date: Wed, Mar 21 2007 12:00PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Tim:

To be clear alt is a very valid attribute and it is part of the standards for HTML

Some Examples:

Applet
Input
etc

Please refer to the W3C Specs for HTML. Alt can be quite powerful.

I hope this helps!

Best Regards,
Rob

From: Robert Yonaitis
Date: Wed, Mar 21 2007 12:10PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Jared:

I also recommend the labels. But to say 508 fails because of this instance would be wrong according to the accessboard.

Cheers,
rob

From: Moore, Michael
Date: Wed, Mar 21 2007 12:20PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Perhaps its time for a little comparison and some results of testing.

First the 508 requirement

§ 1194.22 Web-based intranet and internet information and applications...
(n) When electronic forms are designed to be completed on-line, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues.

Nothing specific there about the method of accomplishing that goal.

Results of our tests with two assistive technologies.

JAWS 6.1+ label element and title attribute both work with default reader settings, alt on anything but image attribute fails. If title and label are both present JAWS will favor the label.

ZoomText 9.0: Label element fails with ZoomText's reader. Title attribute provides most reliable rendering of the purpose of the input.

Our recommendation: Use both title and label whenever possible to achieve the most robust coverage.

Mike Moore
Accessibility Specialist
Department of Assistive and Rehabilitative Services (DARS)
(512) 424-4159


-----Original Message-----
From: = EMAIL ADDRESS REMOVED = [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Robert Yonaitis
Sent: Wednesday, March 21, 2007 12:49 PM
To: WebAIM Discussion List; WebAIM Discussion List
Subject: Re: [WebAIM] Label vs ALT tag on form elements

Jared:

I also recommend the labels. But to say 508 fails because of this instance would be wrong according to the accessboard.

Cheers,
rob

From: Tim Beadle
Date: Wed, Mar 21 2007 1:20PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On 21/03/07, Robert Yonaitis < = EMAIL ADDRESS REMOVED = > wrote:
> Tim:
>
> To be clear alt is a very valid attribute and it is part of the standards for HTML
>
> Some Examples:
>
> Applet
> Input
> etc
>
> Please refer to the W3C Specs for HTML. Alt can be quite powerful.
>
> I hope this helps!

Hi Rob,

Thanks for extending my knowledge. Obviously AFAIK isn't as far as it should be!

Best regards,

Tim

From: Kilcommons,Cath
Date: Thu, Mar 22 2007 2:20PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Keith asked SNIP... I was wondering about the use of an ALT tag on an input as a way of communicating its function.......SNIP


I do not think the webpage would validate if it only had ALT attributes applied and no label. A form page cannot validate without Labels associated with the input element.
ALT might be useful for additional information, but I surely would not rely on it exclusively.

My personal opinion is that we need to be proponents of standards - for coding and for accessibility.

Best,
Cath

++++++
Cath Stager-Kilcommons
ACCESS Project
Access  Specialist
Assistive Technology Resource Center (ATRC)
Colorado State University
970-491-0788
http://accessibility.colostate.edu/
http://www.colostate.edu/Depts/ATRC/
= EMAIL ADDRESS REMOVED =

From: Patrick H. Lauke
Date: Thu, Mar 22 2007 2:30PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Kilcommons,Cath wrote:

> I do not think the webpage would validate if it only had ALT attributes applied and no label. A form page cannot validate without Labels associated with the input element.
> ALT might be useful for additional information, but I surely would not rely on it exclusively.

Validate in what? An automated accessibility checker? That's often
irrelevant, as it's not necessarily a measure of how accessible the
content actually is.

--
Patrick H. Lauke

From: Kilcommons,Cath
Date: Thu, Mar 22 2007 2:50PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

I was actually speaking to code validation via w3 validator, sorry I was
not clear.

-----Original Message-----
From: = EMAIL ADDRESS REMOVED =
[mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Patrick H.
Lauke
Sent: Thursday, March 22, 2007 3:18 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Label vs ALT tag on form elements

Kilcommons,Cath wrote:

> I do not think the webpage would validate if it only had ALT
attributes applied and no label. A form page cannot validate without
Labels associated with the input element.
> ALT might be useful for additional information, but I surely would not
rely on it exclusively.

Validate in what? An automated accessibility checker? That's often
irrelevant, as it's not necessarily a measure of how accessible the
content actually is.

--
Patrick H. Lauke

From: Patrick H. Lauke
Date: Thu, Mar 22 2007 3:00PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

Kilcommons,Cath wrote:
> I was actually speaking to code validation via w3 validator, sorry I was
> not clear.

In that case, the (x)html spec does not mandate the use of labels, so
pages that just use alt on form inputs etc rather than label elements
validate just fine.

Again, it's the AT support that's the clincher here, and the impact this
choice of markup would have on usability in general.

P
--
Patrick H. Lauke

From: Keith Parks
Date: Thu, Mar 22 2007 5:10PM
Subject: Re: Label vs ALT tag on form elements
← Previous message | Next message →

On Mar 21, 2007, at 11:00 AM, Moore, Michael wrote:

> Perhaps its time for a little comparison and some results of testing.
>
> [snip... ZoomText 9.0: Label element fails with ZoomText's reader.
> Title attribute provides most reliable rendering of the purpose of
> the input.
>
> Our recommendation: Use both title and label whenever possible to
> achieve the most robust coverage.

So just to confirm, you tested "Title" and not "ALT", which was what
I originally asked about, right?

Did you test ALT attributes?


******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

World Peace through Cascading Style Sheets.


From: Moore, Michael
Date: Fri, Mar 23 2007 7:00AM
Subject: Re: Label vs ALT tag on form elements
← Previous message | No next message

Keith,

To clarify. I tested label, title, and alt with the following results.

Label using for and id attributes correctly:
JAWS 6.1 Reported Correctly
ZoomText Reader Failed on mousover but succeeded when input was
selected. This was slightly different behavior than I have seen on
previous experiments and in live application testing.

Title attribute on input - no label present
JAWS 6.1 Reported Correctly
ZoomText 9.0 Reader Reported Correctly

Alt attribute on input - no label present
JAWS 6.1 Failed
ZoomText 9.0 Failed

Conclusions: Best practice, use both label and title. Alt attribute is
not reported by the assistive technology tested, thus use would be
marginally beneficial at best, assuming that you found a user agent that
would report the value of the attribute. Obviously, my quick experiment
was not exhaustive.

Code follows:

<h1>Test Form</h1>
<form action="" method="get">
<h2>Label</h2>
<label for="t1">Can you see me now</label>
<input id="t1" type="text" size="40" />

<h2>Title</h2>
<input id="t2" type="text" size="40" title="can you see me now" />

<h2>ALT</h2>
<input id="t3" type="text" size="40" alt="can you see me now" />

</form>


-----Original Message-----
From: = EMAIL ADDRESS REMOVED =
[mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Keith Parks
Sent: Thursday, March 22, 2007 7:09 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Label vs ALT tag on form elements


On Mar 21, 2007, at 11:00 AM, Moore, Michael wrote:

> Perhaps its time for a little comparison and some results of testing.
>
> [snip... ZoomText 9.0: Label element fails with ZoomText's reader.
> Title attribute provides most reliable rendering of the purpose of the

> input.
>
> Our recommendation: Use both title and label whenever possible to
> achieve the most robust coverage.

So just to confirm, you tested "Title" and not "ALT", which was what I
originally asked about, right?

Did you test ALT attributes?


******************************
Keith Parks
Graphic Designer/Web Designer
Student Affairs Communications Services
San Diego State University
San Diego, CA 92182-7444

(619) 594-1046

mailto: = EMAIL ADDRESS REMOVED =
http://www.sdsu.edu
http://www.sa.sdsu.edu/communications
----------------------------------------------------------

World Peace through Cascading Style Sheets.