WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Labels for form controls

for

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

From: Michael Roush
Date: Thu, May 19 2005 2:22PM
Subject: Labels for form controls
No previous message | Next message →

I'm working on a site for an organization that has decided they want the site to conform to AA level of the WCAG 1.0. Furthermore, they want a demonstration of that conformance by passing the page through WAVE [3.0] and getting no 'red flags'.

On the page, I am including a sign-up form that they requested. WAVE asked me to supply a label for one of the form controls (the submit button). Presumably, the value of the Submit button is not enough of a description/label. In order to satisfy the checker, I put in a text label for the Submit button and styled the label with "display: none;" so that it wouldnt show up. Now the checker is satisfied, but I am having a hard time believing this makes the page more understandable and accessible.

Is there a technique I'm missing that I should be using? Is this just one of those instances where conforming to a guideline may mean a reduction in accessibility?


Michael D. Roush, Technology Consultant
Hopewell SERRC




From: ben morrison
Date: Thu, May 19 2005 3:57PM
Subject: Re: Labels for form controls
← Previous message | Next message →

> On the page, I am including a sign-up form that they requested. WAVE asked me to supply a label for one of the form controls (the submit button).

Submit buttons do not need a label tag.

<input type="submit" value="submit">

although im not used to using the WAVE test so cant say wether that is a fault.

HTH ben.


From: Paul Bohman
Date: Thu, May 19 2005 4:25PM
Subject: Re: Labels for form controls
← Previous message | Next message →

Michael Roush wrote:
> I can't imagine
> hidden input controls should require labels. I am thinking more and
> more this is a bug in WAVE.

Ok. I now know why the error messages were there. It is a bug of sorts
in WAVE, but you can also easily changing something in your own code.

It appears that WAVE doesn't like input attributes in single quotes.
When you put the attributes in double quotes, WAVE does not flag them as
errors.

This shows up as an error in WAVE:
<input type='hidden' name='fooc' value='bar'>

This does not:
<input type="hidden" name="fooc" value="bar">

(notice the double quotes)

So it *is* a bug in WAVE, but until the bug is fixed, you can get around
it by using double quotes.

We'll work on fixing the bug on the software, but it may take a little
time, due to the other priorities that we're working on (not related to
WAVE).

--
Paul Bohman
Director of Products and Services
WebAIM (Web Accessibility in Mind)
www.webaim.org
Utah State University
www.usu.edu



From: Michael Roush
Date: Thu, May 19 2005 4:22PM
Subject: Re: Labels for form controls
← Previous message | Next message →

The page as I have it so far (I have changed it back to the way it failed validation in WAVE 3.0) is: http://www.hopewellserrc.org/wcoserrc/index.php

As an additional test, I added three dummy hidden input form controls. WAVE wants labels for them as well. I can't imagine hidden input controls should require labels. I am thinking more and more this is a bug in WAVE.


Michael D. Roush, Technology Consultant
Hopewell SERRC




From: Paul Bohman
Date: Thu, May 19 2005 4:20PM
Subject: Re: Labels for form controls
← Previous message | Next message →

Michael Roush wrote:

> On the page, I am including a sign-up form that they requested. WAVE
> asked me to supply a label for one of the form controls (the submit
> button). Presumably, the value of the Submit button is not enough of
> a description/label.

Submit buttons do not require labels. I'm not sure why WAVE would be
saying that it needs a label. Could you provide a URL for us to look at?


In order to satisfy the checker, I put in a
> text label for the Submit button and styled the label with "display:
> none;" so that it wouldn't show up. Now the checker is satisfied,
> but I am having a hard time believing this makes the page more
> understandable and accessible.

This is unnecessary. There may be another problem in the page that is
causing the error to show up... or maybe you found a bug in WAVE. That's
why I'd like to look at the page to find out what the situation is.

> Is there a technique I'm missing that I should be using? Is this
> just one of those instances where conforming to a guideline may mean
> a reduction in accessibility?

No, you're not missing anything. Submit buttons don't require labels,
and adding labels to them does not increase accessibility.

--
Paul Bohman
Director of Products and Services
WebAIM (Web Accessibility in Mind)
www.webaim.org
Utah State University
www.usu.edu



From: Paul Bohman
Date: Thu, May 19 2005 5:00PM
Subject: Re: Labels for form controls
← Previous message | No next message

Paul Bohman wrote:
> It appears that WAVE doesn't like input attributes in single quotes.
> When you put the attributes in double quotes, WAVE does not flag them as
> errors.

Just as a follow-up to my last post, if you put double quotes around the
attributes in your submit button, the WAVE error message will go away
there too.

<input type="submit" name="submit_button" id="submit_button"
value="Subscribe">

WAVE knows you don't need labels for submit buttons, but unfortunately
right now it doesn't process single quotes like it should.

--
Paul Bohman
Director of Products and Services
WebAIM (Web Accessibility in Mind)
www.webaim.org
Utah State University
www.usu.edu