WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Best practices for identifying forms and their fields

for

From: Jared Smith
Date: May 6, 2013 9:12AM


On Mon, May 6, 2013 at 5:24 AM, Dave Merrill wrote:

> 1. Is it considered best practice for forms to have a title attribute, to
> identify the purpose of the overall form itself?

I would not recommend this practice. The title attribute would only
rarely be presented to the user - pretty much only to sighted mouse
users that hover their mouse over the form to present the mouse
tooltip. And in this case, the tooltip may be more distracting than it
would be helpful. The title would not likely be presented to
keyboard-only users, screen reader users, touch-screen device users,
etc.

> When evaluating site accessibility, should form titles be considered
> at all? How else should forms themselves be labelled?

If the form needs additional explanatory text (i.e., a "title"), then
it should be presented in text to everyone (probably in a heading). If
it doesn't, then there's no need to add something unnecessary and
extraneous to the title attribute.

> If by a header tag, should it be inside the
> form, or immediately preceding it?

I've never really considered this, but I think that inside the form
would be best. On the off-chance a user were to navigate directly to
the form, the heading (not header) would be read first.

> 2. For form fields, clearly a label tag is best practice, but should a
> title attribute ever be used?

If there's a visible label (which almost all form fields should have),
then a label element is always appropriate. If a form field's function
is apparent visibly, but label text is not present (such as an
unlabeled search box with an adjacent "Search" button"), then the
title attribute could be used to convey the function of the field to
screen reader users. The title attribute is generally read by screen
readers, but only if an associated label is NOT present.

Jared