Commits

unkyaku  committed 6ef789a

Fix for WW-599, WWW-579 and WWW-573. XHTML improvements.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@490573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 41aa839

Comments (0)

Files changed (40)

File src/java/template/simple/checkbox.vm

   --   * disabled        - DISABLED parameter of the HTML INPUT tag
   --   * tabindex        - tabindex parameter of the HTML INPUT tag
   --   * onchange        - onkeyup parameter of the HTML INPUT tag
-    *#
-
-#* Use an extra table so that the checkbox doesn't align with the other columns. *#
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-    <tr><td valign="top">
-        <input type="checkbox"
-               name="$!webwork.htmlEncode($parameters.name)"
-               value="$!webwork.htmlEncode($parameters.fieldValue)"
-        #if ($parameters.nameValue)        checked="checked"                                        #end
-        #if ($parameters.disabled == true) disabled="disabled"                                      #end
-        #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
-        #if ($parameters.onchange)         onchange="$!webwork.htmlEncode($parameters.onchange)"    #end
-        #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
-        #if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end
-        #if ($parameters.cssStyle)         style="$!webwork.htmlEncode($parameters.cssStyle)"       #end
-        />
-    </td>
-    <td width="100%" valign="top">
-        #if ($hasFieldErrors)
-            <span class="checkboxErrorLabel">
-        #else
-            <span class="checkboxLabel">
-        #end
-                $!webwork.htmlEncode($parameters.label)
-            </span>
-    </td>
-    </tr>
-</table>
+*#
+<input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($parameters.fieldValue)"
+#if ($parameters.nameValue)        checked="true"                                           #end
+#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
+#if ($parameters.onchange)         onchange="$!webwork.htmlEncode($parameters.onchange)"    #end
+#if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
+#if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end
+#if ($parameters.cssStyle)         style="$!webwork.htmlEncode($parameters.cssStyle)"       #end
+/>
+<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end
+#if ($hasFieldErrors) class="checkboxErrorLabel"#else class="checkboxLabel"#end>$!webwork.htmlEncode($parameters.label)</label>

File src/java/template/simple/checkboxlist.vm

 #set( $items = $parameters.list )
 #if( $items )
-#foreach( $item in $items )
-       $stack.push($item)
-
+    #set( $itemCount = 0 )
+    #foreach( $item in $items )
+        #set( $itemCount = $itemCount + 1)
+        $stack.push($item)
         #if( $parameters.listKey )
             #set( $itemKey = $stack.findValue($parameters.listKey) )
         #else
             #set( $itemKey = $item )
         #end
-
         #if( $parameters.listValue )
             #set( $itemValue  = $stack.findValue($parameters.listValue) )
         #else
             #set( $itemValue = $item )
         #end
-
-  <div>
-   <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked #end/>
-   <label class="label">$!webwork.htmlEncode($itemValue)</label>
-  </div>
-
+        <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)"
+        id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="true" #end/>
+        <label for="$!webwork.htmlEncode($parameters.name)-$itemCount" class="checkboxLabel">$!webwork.htmlEncode($itemValue)</label><br />
         #set ($trash = $stack.pop())
-#end
-
+    #end
 #else
   &nbsp;
 #end

File src/java/template/simple/form-close.vm

+</form>
 #if ($parameters.validate)
     <script type="text/javascript">
     function ${parameters.name}_validate() {
         if (focus != null) {
             form.elements[focus].focus();
             if (form.elements[focus].type == 'text' || form.elements[focus].type == 'textarea') {
-                form.elements[focus].select();            
+                form.elements[focus].select();
             }
             return false;
         } else {
     }
     </script>
 #end
-</form>

File src/java/template/simple/form.vm

 <form
-    #if ($parameters.id)        id="$!webwork.htmlEncode($parameters.id)"           #end
-    #if ($parameters.name)      name="$!webwork.htmlEncode($parameters.name)"       #end
-    #if ($parameters.action)    action="$!webwork.htmlEncode($parameters.action)"   #end
-    #if ($parameters.method)    method="$!webwork.htmlEncode($parameters.method)"   #end
-    #if ($parameters.enctype)   enctype="$!webwork.htmlEncode($parameters.enctype)" #end
-    #if ($parameters.validate)  onsubmit="return(${parameters.name}_validate())"    #end
+#if ($parameters.id)        id="$!webwork.htmlEncode($parameters.id)"           #end
+#if ($parameters.name)      name="$!webwork.htmlEncode($parameters.name)"       #end
+#if ($parameters.action)    action="$!webwork.htmlEncode($parameters.action)"   #end
+#if ($parameters.method)    method="$!webwork.htmlEncode($parameters.method)"   #end
+#if ($parameters.enctype)   enctype="$!webwork.htmlEncode($parameters.enctype)" #end
+#if ($parameters.validate)  onsubmit="return(${parameters.name}_validate())"    #end
+#if ($parameters.cssClass)  class="$!webwork.htmlEncode($parameters.cssClass)"  #end
+#if ($parameters.cssStyle)  style="$!webwork.htmlEncode($parameters.cssStyle)"  #end
 >

File src/java/template/simple/submit.vm

-<div
-        #if ($parameters.align)      align="$!webwork.htmlEncode($parameters.align)"     #end
-        ><input
-            type="submit"
-            #if ($parameters.name)       name="$!webwork.htmlEncode($parameters.name)"           #end
-            #if ($parameters.nameValue)  value="$!webwork.htmlEncode($parameters.nameValue)"     #end
-            #if ($parameters.cssClass)   class="$!webwork.htmlEncode($parameters.cssClass)"      #end
-            #if ($parameters.cssStyle)   style="$!webwork.htmlEncode($parameters.cssStyle)"      #end
-        /></div>
+<input type="submit"
+#if ($parameters.name)       name="$!webwork.htmlEncode($parameters.name)"           #end
+#if ($parameters.nameValue)  value="$!webwork.htmlEncode($parameters.nameValue)"     #end
+#if ($parameters.cssClass)   class="$!webwork.htmlEncode($parameters.cssClass)"      #end
+#if ($parameters.cssStyle)   style="$!webwork.htmlEncode($parameters.cssStyle)"      #end
+/>

File src/java/template/xhtml/checkbox.vm

     </tr>
   #end
 #end
-
-<tr>
-    <td  valign="top" colspan="2">
-#parse("/template/simple/checkbox.vm")
-
+<tr><td valign="top" colspan="2">
+<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">
+<input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($parameters.fieldValue)"
+#if ($parameters.nameValue)        checked="true"                                           #end
+#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
+#if ($parameters.onchange)         onchange="$!webwork.htmlEncode($parameters.onchange)"    #end
+#if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
+#if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end
+#if ($parameters.cssStyle)         style="$!webwork.htmlEncode($parameters.cssStyle)"       #end
+/></td><td width="100%" valign="top">
+<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end
+#if ($hasFieldErrors) class="checkboxErrorLabel"#else class="checkboxLabel"#end>$!webwork.htmlEncode($parameters.label)</label>
+</td></tr></table>
 #parse("/template/xhtml/controlfooter.vm")

File src/java/template/xhtml/checkboxlist.vm

 #parse( "/template/xhtml/controlheader.vm" )
-#parse( "/template/simple/checkboxlist.vm" )
+#set( $items = $parameters.list )
+#if( $items )
+    #set( $itemCount = 0 )
+    #foreach( $item in $items )
+        #set( $itemCount = $itemCount + 1)
+        $stack.push($item)
+        #if( $parameters.listKey )
+            #set( $itemKey = $stack.findValue($parameters.listKey) )
+        #else
+            #set( $itemKey = $item )
+        #end
+        #if( $parameters.listValue )
+            #set( $itemValue  = $stack.findValue($parameters.listValue) )
+        #else
+            #set( $itemValue = $item )
+        #end
+        <div>
+         <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)"
+         id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="true" #end/>
+         <label for="$!webwork.htmlEncode($parameters.name)-$itemCount" class="checkboxLabel">$!webwork.htmlEncode($itemValue)</label>
+        </div>
+        #set ($trash = $stack.pop())
+    #end
+#else
+  &nbsp;
+#end
 #parse( "/template/xhtml/controlfooter.vm" )

File src/java/template/xhtml/controlheader.vm

 ## Only show message if errors are available.
 ## This will be done if ActionSupport is used.
-
 #if( $fieldErrors.get($parameters.name) )
   #set ($hasFieldErrors = $fieldErrors.get($parameters.name))
   #foreach ($error in $fieldErrors.get($parameters.name))
     </tr>
   #end
 #end
-
 ## if the label position is top,
 ## then give the label it's own row in the table
-
 <tr>
-    #if ($parameters.labelposition == 'top')
-        <td align="left" valign="top" colspan="2">
-    #else
-        <td align="right" valign="top">
-    #end
-
-        #if ($hasFieldErrors)
-            <span class="errorLabel">
-        #else
-            <span class="label">
-        #end
-
-        #if ($parameters.label)
-            #if ($parameters.required) <span class="required">*</span> #end $!webwork.htmlEncode($parameters.label):
-        #end
-            </span>
-        </td>
-
+#if ($parameters.labelposition == 'top')
+    <td align="left" valign="top" colspan="2">
+#else
+    <td align="right" valign="top">
+#end
+#if ($parameters.label)
+    <label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end
+    #if ($hasFieldErrors) class="errorLabel"#else class="label"#end>
+    #if ($parameters.required) <span class="required">*</span> #end $!webwork.htmlEncode($parameters.label):
+    </label>
+#end
+    </td>
 ## add the extra row
 #if ($parameters.labelposition == 'top')
 </tr>
 <tr>
 #end
-    <td>
+    <td>

File src/java/template/xhtml/form-close.vm

-#parse("/template/simple/form-close.vm")
-</table>
+</table>
+#parse("/template/simple/form-close.vm")

File src/java/template/xhtml/form.vm

-<table>
 #parse("/template/simple/form.vm")
+<table class="wwFormTable">

File src/java/template/xhtml/styles.css

+.wwFormTable {}
 .label {font-style:italic; }
 .errorLabel {font-style:italic; color:red; }
 .errorMessage {font-weight:bold; text-align: center; color:red; }

File src/java/template/xhtml/submit.vm

 <tr>
     <td colspan="2">
+<div #if ($parameters.align) align="$!webwork.htmlEncode($parameters.align)" #end >
 #parse("/template/simple/submit.vm")
+</div>
 #parse( "/template/xhtml/controlfooter.vm" )

File src/test/com/opensymphony/webwork/views/jsp/ui/Checkbox-1.txt

-<tr>
-    <td valign="top" colspan="2">
-        <table width="100%" border="0" cellpadding="0" cellspacing="0">
-            <tr><td valign="top">
-                <input type="checkbox"
-                       name="foo"
-                       value="baz"
-                       checked="checked"
-                />
-            </td>
-            <td width="100%" valign="top">
-                <span class="checkboxLabel"> mylabel </span>
-            </td>
-            </tr>
-        </table>
+<tr><td valign="top" colspan="2">
+    <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">
+        <input type="checkbox" name="foo" value="baz"
+        checked="true"
+    /></td><td width="100%" valign="top">
+        <label class="checkboxLabel">mylabel</label>
+    </td></tr></table>
     </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/Checkbox-2.txt

-<tr>
-    <td valign="top" colspan="2">
-        <table width="100%" border="0" cellpadding="0" cellspacing="0">
-            <tr><td valign="top">
-                <input type="checkbox"
-                       name="foo"
-                       value="baz"
-                />
-            </td>
-            <td width="100%" valign="top">
-                <span class="checkboxLabel"> mylabel </span>
-            </td>
-            </tr>
-        </table>
+<tr><td valign="top" colspan="2">
+    <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">
+        <input type="checkbox" name="foo" value="baz"
+    /></td><td width="100%" valign="top">
+        <label class="checkboxLabel">mylabel</label>
+    </td></tr></table>
     </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/Checkbox-3.txt

         <span class="errorMessage">Another Foo Error</span>
     </td>
 </tr>
-<tr>
-    <td valign="top" colspan="2">
-        <table width="100%" border="0" cellpadding="0" cellspacing="0">
-            <tr><td valign="top">
-                <input type="checkbox"
-                       name="foo"
-                       value="baz"
-                       checked="checked"
-                />
-            </td>
-            <td width="100%" valign="top">
-                <span class="checkboxErrorLabel"> mylabel </span>
-            </td>
-            </tr>
-        </table>
+<tr><td valign="top" colspan="2">
+    <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top">
+        <input type="checkbox" name="foo" value="baz"
+            checked="true"
+    /></td><td width="100%" valign="top">
+        <label class="checkboxErrorLabel">mylabel</label>
+    </td></tr></table>
     </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/CheckboxList-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <div>
-            <input type="checkbox" name="foo" value="hello" checked />
-            <label class="label">world</label>
+            <input type="checkbox" name="foo" value="hello" id="foo-1" checked="true" />
+            <label for="foo-1" class="checkboxLabel">world</label>
         </div>
         <div>
-            <input type="checkbox" name="foo" value="foo" />
-            <label class="label">bar</label>
+            <input type="checkbox" name="foo" value="foo" id="foo-2" />
+            <label for="foo-2" class="checkboxLabel">bar</label>
         </div>
     </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/CheckboxList-2.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <div>
-            <input type="checkbox" name="collection" value="hello" checked />
-            <label class="label">world</label>
+            <input type="checkbox" name="collection" value="hello" id="collection-1" checked="true" />
+            <label for="collection-1" class="checkboxLabel">world</label>
         </div>
         <div>
-            <input type="checkbox" name="collection" value="foo" checked />
-            <label class="label">bar</label>
+            <input type="checkbox" name="collection" value="foo" id="collection-2" checked="true" />
+            <label for="collection-2" class="checkboxLabel">bar</label>
         </div>
         <div>
-            <input type="checkbox" name="collection" value="cat" />
-            <label class="label">dog</label>
+            <input type="checkbox" name="collection" value="cat" id="collection-3" />
+            <label for="collection-3" class="checkboxLabel">dog</label>
         </div>
     </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/ComboBox-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="text" name="foo" /><br/>

File src/test/com/opensymphony/webwork/views/jsp/ui/File-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="file"

File src/test/com/opensymphony/webwork/views/jsp/ui/FormTagTest.java

 import com.opensymphony.webwork.config.Configuration;
 import com.opensymphony.webwork.views.jsp.AbstractUITagTest;
 
+import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.config.ConfigurationManager;
 
 
         super.setUp();
         ConfigurationManager.clearConfigurationProviders();
         ConfigurationManager.addConfigurationProvider(new TestConfigurationProvider());
+        ActionContext.getContext().setValueStack(stack);
     }
 }

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-1.txt

-<table>
 <form name="myForm" action="myAction" method="POST" enctype="myEncType" >
-</form>
+<table class="wwFormTable">
 </table>
+</form>

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-2.txt

-<table>
 <form name="myForm" action="/testAction.action" method="POST" enctype="myEncType" onsubmit="return(myForm_validate())" >
+<table class="wwFormTable">
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top"> </td>
  <td> <input type="text" name="foo" value="bar" /> </td>
 </tr>
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top"> </td>
  <td> <input type="text" name="user.name" value="Bobby" /> </td>
 </tr>
+</table>
+</form>
 <script type="text/javascript">
 function myForm_validate() {
   var form = document.forms['myForm'];
   return null;
 }
 </script>
-</form>
-</table>

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-2b.txt

-<table>
 <form name="myForm" action="/testAction.action" method="POST" enctype="myEncType" onsubmit="return(myForm_validate())" >
+<table class="wwFormTable">
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top">  </td>
  <td> <input type="text" name="foo" value="bar" /> </td>
 </tr>
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top">  </td>
  <td> <input type="text" name="user.name" value="Bobby" /> </td>
 </tr>
+</table>
+</form>
 <script type="text/javascript">
 function myForm_validate() {
   var form = document.forms['myForm'];
   return null;
 }
 </script>
-</form>
-</table><table>
 <form name="myForm" action="/testAction.action" method="POST" enctype="myEncType" onsubmit="return(myForm_validate())" >
+<table class="wwFormTable">
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top">  </td>
  <td> <input type="text" name="foo" value="bar" /> </td>
 </tr>
 <tr>
- <td align="right" valign="top"> <span class="label"> </span> </td>
+ <td align="right" valign="top">  </td>
  <td> <input type="text" name="user.name" value="Bobby" /> </td>
 </tr>
+</table>
+</form>
 <script type="text/javascript">
 function myForm_validate() {
   var form = document.forms['myForm'];
   return null;
 }
 </script>
-</form>
-</table>

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-3.txt

-<table>
 <form name="myForm" action="/testNamespace/testNamespaceAction.action" method="POST" >
-</form>
+<table class="wwFormTable">
 </table>
+</form>

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-4.txt

-<table>
 <form >
-</form>
+<table class="wwFormTable">
 </table>
+</form>

File src/test/com/opensymphony/webwork/views/jsp/ui/Formtag-5.txt

-<table>
 <form name="myForm" action="/testNamespace/testNamespaceAction.jspa" method="POST" >
+<table class="wwFormTable">
+</table>
 </form>
-</table>

File src/test/com/opensymphony/webwork/views/jsp/ui/Label-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <label > bar </label>

File src/test/com/opensymphony/webwork/views/jsp/ui/Label-2.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <label > foo </label>

File src/test/com/opensymphony/webwork/views/jsp/ui/Label-3.txt

 <tr>
     <td align="left" valign="top" colspan="2">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
 </tr>
 <tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/Password-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="password"

File src/test/com/opensymphony/webwork/views/jsp/ui/Radio-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="radio"

File src/test/com/opensymphony/webwork/views/jsp/ui/Radio-2.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="radio"

File src/test/com/opensymphony/webwork/views/jsp/ui/Select-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <select name="foo"

File src/test/com/opensymphony/webwork/views/jsp/ui/Select-2.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <select name="collection"

File src/test/com/opensymphony/webwork/views/jsp/ui/Submit-1.txt

 <tr>
-    <td colspan="2"> <div align="left" ><input type="submit" name="myname" value="bar" /></div> </td>
+    <td colspan="2"> <div align="left" > <input type="submit" name="myname" value="bar" /> </div> </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/Submit-2.txt

 <tr>
-    <td colspan="2"> <div align="right" ><input type="submit" name="myname" value="Submit" /></div> </td>
+    <td colspan="2"> <div align="right" > <input type="submit" name="myname" value="Submit" /> </div> </td>
 </tr>

File src/test/com/opensymphony/webwork/views/jsp/ui/Textarea-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label for="the_id" class="label"> mylabel: </label>
     </td>
     <td>
         <textarea name="myname"

File src/test/com/opensymphony/webwork/views/jsp/ui/Textfield-1.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> mylabel: </span>
+        <label class="label"> mylabel: </label>
     </td>
     <td>
         <input type="text" 

File src/test/com/opensymphony/webwork/views/jsp/ui/Textfield-2.txt

 </tr>
 <tr>
     <td align="right" valign="top">
-        <span class="errorLabel"> mylabel: </span>
+        <label class="errorLabel"> mylabel: </label>
     </td>
     <td>
         <input type="text"

File src/test/com/opensymphony/webwork/views/jsp/ui/Textfield-3.txt

 <tr>
     <td align="right" valign="top">
-        <span class="label"> </span>
     </td>
     <td>
         <input type="text"