I think it's great to use label elements but I wouldn't use what you proposed. My labels are typically in a separate table cell than the input field and the tag wouldn't handle that. If we did add this support I would be in favor of the labelKey attribute but not the label attribute. We shouldn't support hardcoding text into the tags and should force people to i18n the text.

If other committers are in favor, you supply a patch to the tag and the tld/docs, and assure us you've tested it :-), I would be willing to apply it.

David






From: "Matt Raible" <[EMAIL PROTECTED]>
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Enhancement Request - add label and labelKey to form elements
Date: Mon, 25 Nov 2002 11:10:33 -0700

I thought I'd run this idea by the development team before entering it
into Bugzilla.

One of the items that is required with 508 compliance is a <label> value
for each form element:

For example:

<label for="name">Name:</label>
<input type="text" id="name" size="50" name="name" />

More information at: http://www.csuohio.edu/uctl/508/forms.html

This would typically be rendered with Struts tags using:

<label for="name">Name:</label>
<html:text name="name" styleId="name" size="50"/>

To make it easier, we could do:

<html:text name="name" styleId="name" size="50" label="Name:"/> OR
<html:text name="name" styleId="name" size="50" labelKey="prompt.name"/>

The problems I see with this are that you lose some control over the
presentation (i.e. a <br /> after the label or labels in a separate
<td>). However, it might be useful for rapid prototyping and
code-generating tools. My hope someday is that the JSP simply renders
XML, and then an XSL stylesheet is applied, and in this case, the
presentation issues would disappear?

What does everyone think? Would anyone use it?

Thanks,

Matt



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to