Re: Well formed XForms

Greetings, the example is not valid according to the XForms 1.0 spec [1] 
which states that element label is a required child of <input>. This is 
also specified in the normative schema for XForms [2].

Can an xforms:label be used in places other than those specified in the 
XForms spec/schema? I'm not aware of a way of stopping a host language 
allowing it to be used anywhere, so it can. Should it be used in other 
places? Hmmm . . . 

The example could be made valid by inserting an empty label as a child of 
input which would make it valid but would most certainly not be in the 
spirit of what is intended. The explicit relationship between a form 
control and its label (and hint, help) are a very important accessability 
enabler.

[1] http://www.w3.org/TR/xforms/slice8.html#id2625797
[2] http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd

Regards, Roland




Steve Brimley <steve.brimley@toplev.com> 
Sent by: www-forms-request@w3.org
14/03/2005 10:41

To
www-forms@w3.org
cc

Subject
Well formed XForms







Hi

I have been try and get to grips with XForms by looking at sample XForms
code together with the XForms spec.  One of the samples I am looking for 
is
at http://www.mozilla.org/projects/xforms/sample1.xhtml.  It contains code
that dissociates labels from form controls.  Most of the labels are like
this but here's a fragment as an example:

                   <tr bgcolor="#eeeeee">
                     <td valign="top" bgcolor="#eeeeee">
                                   <xf:label id="b8">9</xf:label>
                                 </td>
                     <td valign="top" bgcolor="#eeeeee">
                                   <xf:label id="n8">
                                     Add lines 7 and 8a.  These are your 
<b>total
payments.</b>
                                   </xf:label>
                                 </td>
                     <td align="right" valign="top" bgcolor="#eeeeee">
                                   <xf:input 
ref="/f1040ez/section03/line09"/>
                                 </td>
                   </tr>

This doesn't seem to conform to the definition of a label in the spec 
since
there is no "containing form control":

8.3.3 The label Element
This required element labels the containing form control with a 
descriptive
label. Additionally, the label makes it possible for someone who can't see
the form control to obtain a short description while navigating between 
form
controls.

So my question is; is the sample code well formed or not?

Regards


Steve Brimley
Technical Director, Toplevel Computing
Phone 01453 753955

Received on Monday, 14 March 2005 11:15:34 UTC