Fork me on GitHub

Netquery XHTML Interface - Request for Comments  Bottom

  • I have been working recently on making Netquery fully compliant with current CSS and XHTML standards and I've found that the W3C XHTML Strict validator seems to dislike the simultaneous display of multiple forms. More precisely, it objects to multiple instances anywhere on a single page of input fields with the same ID, even when they're in separate forms.

    In the circumstances, there appears to be three options. The validator would be satified if we simply elimate those input field ID attributes and rely on input field names alone (deprecated). We could completely revise the PHP script handling of forms posting to accomodate multiple unique IDs for essentially the same input values (e.g., authid). Or we could revise Netquery's user interface so that it displays only one input form at a time rather than displaying all query types at once on the same page.

    I am hesitant about the first option. Relying on deprecated attributes never seems like a wise approach and is quite likely to require even more work in the longer term. To me, the second option seems more like a kludge than a real solution and it doesn't appeal to my "neatness" fetish. So, although the last option probably involves the most work in the short term, it may be the best direction to take for a number of reasons -- not least being a simplified user interface, at least in its outward appearance.

    I am currently trying out the third option concept in the standalone edition only which can be seen on my test site at http://www.virtech.org/netquery/ That new XHTML interface approach can be compared to the existing (v2.1) Postnuke module multiform interface at http://postnuke.virtech.org/index.php?module=Netquery

    I'd be grateful for any and all opinions and comments that anyone might care to offer. If users (actual and potential) think it's worth pursuing, I'll then take a crack at similar updates for the CMS editions, including the module for Postnuke, of course.
  • Richard,

    Assuming by id you mean the id attribute then yes the validator will object to this as id has to be unique across the entire page. You say that the name field is deprecated. This is true only for some tags. The name attribute of form elements (text fields etc. is ok) but for forms, links, images etc. it is deprecated.

    So removing the id fields on the form elelments wouldn't be a problem for the reason you state. However you do need ID's on the visible controls so that you can match the label to them (label for- control id) so removing them isn't an option - this is for accessibility reasons rather than standards any compliance.

    My solution would be to create a static counter within your form display function. Increment each counter on the execution of the form display function. Then add the counter to each form control id and label for attribute (.e.g ). The control names stay the same as this isn't as problem.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks, Mark. That reference on element name/id usage is more specific than the one I read and your suggestion is much appreciated. I'm sure it will be put to good use regardles of whether the Netquery interface is revised.
  • Richard,

    No problem - it's often easier to go direct to the specs rather than another site's interpretation of them.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • 0 users

This list is based on users active over the last 60 minutes.