WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Re: how to convey that at list one field should bepopulated

for

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

From: Jukka K. Korpela
Date: Tue, Dec 05 2006 2:10AM
Subject: Re: how to convey that at list one field should bepopulated
No previous message | Next message →

On Tue, 5 Dec 2006, Shrirang Sahasrabudhe wrote:

> In my application I have a scenario like
> On a form I have 3 text inputs and user must provide value for at list one of them.
> How should I convey it?

By saying that right before them. Example:

<fieldset>
<legend>Contact information</legend>
Please specify <em>at least one</em> of the following:
<div><label for="email">Your email address:</label>
<input id="email" size="30"></div>
<div><label for="phone">Your home phone:</label>
<input id="phone" size="20"></div>
<div><label for="phonew">Your work phone:</label>
<input id="phonew" size="20"></div>
</fieldset>

Optionally, add JavaScript code (scripted events) that checks,
client-side, that at least one of the field is non-empty and non-blank.
In this case, this would probably mean using just onsubmit="..." in the
<form> tag.

The basic accessibility aspect in client-side checking is that by giving
the user feedback about his mistakes as soon as possible, we help people
with short attention span or with memory difficulties to understand what
went wrong and to fix the problem.

> Is there any technique to take care of such scenarios?

There's no special notation that would be generally understood.

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





From: Keith Parks
Date: Thu, Dec 14 2006 12:15PM
Subject: Re: how to convey that at list one field should bepopulated
← Previous message | Next message →

On Dec 11, 2006, at 8:51 PM, Shrirang Sahasrabudhe wrote:

> Thanks
> I am putting “Please specify at least one of the following:” as a
> h3, would it be appropriate?

In theory, for proper nesting of <h> tags, there would have to be an
h2 preceding it in your content flow for that bit of text to be
tagged as an h3. As I understand it, <h> levels should not be
arbitrarily assigned based on the relative "importance" of the
information, but are supposed to follow a strict hierarchy.

> I’ll be putting the heading off-screen

From your original post it seemed like *all* users would need to be
aware of that requirement. So shouldn't it be on screen somewhere?

-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: Shrirang Sahasrabudhe
Date: Thu, Dec 14 2006 12:15PM
Subject: Re: how to convey that at list one field should bepopulated
← Previous message | No next message

Thanks
I am putting “Please specify at least one of the following:” as a h3, would it be appropriate?
I’ll be putting the heading off-screen
Shri


"Jukka K. Korpela" < = EMAIL ADDRESS REMOVED = > wrote: On Tue, 5 Dec 2006, Shrirang Sahasrabudhe wrote:

> In my application I have a scenario like
> On a form I have 3 text inputs and user must provide value for at list one of them.
> How should I convey it?

By saying that right before them. Example:


Contact information
Please specify at least one of the following:
Your email address:
[input]

Your home phone:
[input]

Your work phone:
[input]



Optionally, add JavaScript code (scripted events) that checks,
client-side, that at least one of the field is non-empty and non-blank.
In this case, this would probably mean using just onsubmit="..." in the
tag.

The basic accessibility aspect in client-side checking is that by giving
the user feedback about his mistakes as soon as possible, we help people
with short attention span or with memory difficulties to understand what
went wrong and to fix the problem.

> Is there any technique to take care of such scenarios?

There's no special notation that would be generally understood.

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