WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Labels for file fields?

for

From: Peter Weil
Date: May 8, 2009 7:15AM


On May 7, 2009, at 6:56 PM, <EMAIL REMOVED> wrote:

> I'm wondering how well screenreaders work with file fields in forms
> and
> whether or not it's necessary to use a label.

See "Use the label element to make your HTML forms accessible" at
456bereastreet.com:

http://tinyurl.com/ysju7g


> Is this acceptable?
>
> <fieldset>
> <legend>Step 2: Upload Edited File</legend>
> <ul>
> <li><input name="template" id="template" type="file" /></li>
> <li><input name="" type="submit" value="Upload" /></li>
> </ul>
> </fieldset>


The way I understand it, "labeling" form controls (inputs) via the
value attribute is not an acceptable substitute for the label element.