Struts 2
  1. Struts 2
  2. WW-2493

XHTML compliance errors in CSS_XHTML theme

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None

      Description

      1] @s.form uses non standard HTML attributes

      <form id="x" name="formName" onsubmit="return true;" action="actionName">...

      => action and name are not standard HTML attributes

      2] Also, @s.submit always defaults to adding a "align=" attribute, which is not XHTML compliant.

        Activity

        Hide
        Jeromy Evans added a comment -

        1) Which standard are you referring to?

        action is a REQUIRED attribute in HTML4
        name is an IMPLIED attribute in HTML4

        http://www.w3.org/TR/html4/interact/forms.html#h-17.3

        2) Which theme is the align="" attribute occurring in?
        It's not present in the simple theme and appears to be conditional in css_xhtml and xhtml.

        <#if parameters.align?exists>
        align="$

        {parameters.align?html}

        "<#t/>
        </#if>

        Show
        Jeromy Evans added a comment - 1) Which standard are you referring to? action is a REQUIRED attribute in HTML4 name is an IMPLIED attribute in HTML4 http://www.w3.org/TR/html4/interact/forms.html#h-17.3 2) Which theme is the align="" attribute occurring in? It's not present in the simple theme and appears to be conditional in css_xhtml and xhtml. <#if parameters.align?exists> align="$ {parameters.align?html} "<#t/> </#if>
        Hide
        Sami Dalouche added a comment -

        1] I am referring to the XHTML standard.

        It looks like name has been deprecated in XHTML.
        http://www.w3.org/TR/xhtml1/#h-4.10
        > Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML.

        Concerning the "action" attribute, I was just plain wrong. this is definitely required, and I don't even see how the form could work without that anyways

        2] on my setup, with struts 2.1.0 a simple call like :

        <@s.submit
        theme="css_xhtml"
        value="Submit" />

        generates the following code :
        <div align="right" id="wwctrl_actionName">
        <input type="submit" id="actionName_2_0" value="Submit" />
        </div>

        and yes, I do see the condition in the FTL template.
        <#if parameters.align?exists>
        align="$

        {parameters.align?html}

        "<#t/>
        </#if>
        However, it does print the div align="right", so I guess this must come from the Java code that would set a default value

        Show
        Sami Dalouche added a comment - 1] I am referring to the XHTML standard. It looks like name has been deprecated in XHTML. http://www.w3.org/TR/xhtml1/#h-4.10 > Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML. Concerning the "action" attribute, I was just plain wrong. this is definitely required, and I don't even see how the form could work without that anyways 2] on my setup, with struts 2.1.0 a simple call like : <@s.submit theme="css_xhtml" value="Submit" /> generates the following code : <div align="right" id="wwctrl_actionName"> <input type="submit" id="actionName_2_0" value="Submit" /> </div> and yes, I do see the condition in the FTL template. <#if parameters.align?exists> align="$ {parameters.align?html} "<#t/> </#if> However, it does print the div align="right", so I guess this must come from the Java code that would set a default value
        Hide
        mtombesi added a comment -

        I ask for the BUG priority escalation, since It's a VERY disappointing problem in case of web accessibility concerns..
        we have to develop a valid WAI interface using theme and templates so we need that these features are working

        NOTE:
        in XHTML Strict
        the align attribute is INVALID
        the form name attribute is INVALID...

        Show
        mtombesi added a comment - I ask for the BUG priority escalation, since It's a VERY disappointing problem in case of web accessibility concerns.. we have to develop a valid WAI interface using theme and templates so we need that these features are working NOTE: in XHTML Strict the align attribute is INVALID the form name attribute is INVALID...

          People

          • Assignee:
            Unassigned
            Reporter:
            Sami Dalouche
          • Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development