WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Best practices for identifying forms and their fields

for

From: Dave Merrill
Date: May 6, 2013 11:09AM


Thanks Jared, helpful.

You're saying that a field's title WILL be read if no label is present, as
in your search box example, right? If so, then in the context of an
accessibility review tool in a CMS, the logic would be:
- If there's a label with text, show it
- If not, and there's a title, show it, but suggest that there should be a
label if that's workable
- If there's neither, show both label and title as missing, suggesting that
lable should be used if that's workable

Make sense?

(You're right, I meant a heading tag for a form, not a header.)

Thanks again,
Dave Merrill


On Mon, May 6, 2013 at 11:12 AM, Jared Smith < <EMAIL REMOVED> > wrote:

> 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
> > > >



--
Dave Merrill