473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Accessibility with forms, tables, labels and input fields

For accessibility, labels should explicitly map to one input element. But
what to do when a text label pertains to three input fields, for instance
date of birth?

I have an html snippet:

<tr>
<th scope="col">
<label for="dobdd">Date of Birth (dd/mm/yyyy)</label>
</th>
<td>
<input type="text" name="dobdd" id="dobdd" />
<input type="text" name="dobmm" id="dobmm" />
<input type="text" name="dobyyyy" id="dobyyyy" />
</td>
</tr>

Now logically the label maps to all three fields, but the label
specification allows one id in the for attribute. Any suggestions of
clarifying this little oddity?

--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Design Tutorial: http://www.sitepoint.com/article/1010
Jul 20 '05 #1
2 2300
In article <li***********@sidious.isolani.co.uk>, one of infinite monkeys
at the keyboard of Isofarro <sp*******@spamdetector.co.uk> wrote:
Now logically the label maps to all three fields,


Disagree. It doesn't map to any of them individually.

The structure you described looks to me like a fieldset, and your
label its legend. Within the fieldset, each of the three fields
has a label.

Now, consider the visual rendition of what you described:

<td>
<input type="text" name="dobdd" id="dobdd" />
<input type="text" name="dobmm" id="dobmm" />
<input type="text" name="dobyyyy" id="dobyyyy" />
</td>

Schematically, that's
________ ________ ________
which is no great help to anyone.

In the absence of further cues, that's seriously confusing. An american
will get it wrong if they assume their inside-out date notation. I'd
be inclined to pre-populate those fields with things like "dd" - and
perhaps use an onclick event to clear the preset values for convenience.

Or - ahem - make it a single field.

--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
Jul 20 '05 #2
Nick Kew wrote:
Now, consider the visual rendition of what you described:

<td>
<input type="text" name="dobdd" id="dobdd" />
<input type="text" name="dobmm" id="dobmm" />
<input type="text" name="dobyyyy" id="dobyyyy" />
</td>

Schematically, that's
________ ________ ________
which is no great help to anyone.

In the absence of further cues, that's seriously confusing. An american
will get it wrong if they assume their inside-out date notation. I'd
be inclined to pre-populate those fields with things like "dd" - and
perhaps use an onclick event to clear the preset values for convenience.
I'm lucky in a way that the website offers products for the UK only. So
inside out dates shouldn't be a problem. Although prepopulating the fields
with dd mm and yyyy are probably still very useful.
Or - ahem - make it a single field.


That's what I am going to recommend as a better solution. Although the
initial spec did have it as one field, then they split it into three - I'll
check the reasons behind that decision and see if they hold.

--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Design Tutorial: http://www.sitepoint.com/article/1010
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
3
by: ShadowMan | last post by:
Hi I have a big form with a lot of input fields. I would use a pretty CSS to make page more readable: - what style do you use in this case? (label strictly near input field? fixed-size label? )...
14
by: Roderik | last post by:
Hi, Since the good support of CSS we shouldn't use tables for layout. And I am quite far in using divs and styling elements to position them without the use of tables. I was wondering how we...
8
by: fleemo17 | last post by:
I'm trying to validate the WAI Accessibility of my web page, and all is good except for the form I have on it. I'm getting a flag that reads: "Identify all non-hidden INPUT elements that do not...
5
by: S | last post by:
Hello Is there a recommended way to line up form fields with their labels so that the label column is right justified and the fields are left justified? Example: ...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Brian Cryer | last post by:
I posted this question recently to microsoft.public.dotnet.languages.vb but didn't get any answer. I'm hoping that someone here will be able to help me. I'm working on a project using VB.NET...
24
by: Mike Otten | last post by:
Any help greatly appreciated. The validated page is at: http://myweb.stedwards.edu/michaelo/ddtab.htm The trouble is with the radio buttons (2/3-down the left column). The radios are...
8
by: SBC News Groups | last post by:
Can someone please tell/show me how I would do the following... I have a table called tblOne. In tblOne I have three fields, two, three, four. I have a form called frmMain. I have three blank...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.