Forum OpenACS Development: Re: doubleinput widget

Collapse
2: Re: doubleinput widget (response to 1)
Posted by Emmanuelle Raffenne on
Malte,

Zen CSS won't complain about it and the element will be displayed as it has been built. However, the problem might be the validity of the resulting HTML. Each input field must be associated with a label -this is done in the label tag (<label for="$the_input_id">)- and it's not possible to associate a label with 2 different input fields.

Collapse
3: Re: doubleinput widget (response to 2)
Posted by Malte Sussdorff on
Thanks for that information, that is useful, will forward that to the original developer. I think the label issue could be solved by having a "label for="${the_input_id}_1" and "_2". At least I have seen something like this in the date widget.

The question that remains for me is, should I commit this to core (HEAD)?

Collapse
4: Re: doubleinput widget (response to 3)
Posted by Gustaf Neumann on
malte,

where have you seen the <label for=....> with two ids?
Reading the HTML specs, this does not seem correct. I would think it would be correct to use a fieldset in such cases.

-gustaf

Collapse
5: Re: doubleinput widget (response to 4)
Posted by Carl Robert Blesius on
Malte, you can do this with CSS and html. No need for added complexity (especially if it introduces invalid html)

As part of the Zen work Mark spent some time testing example forms in all kinds of configurations using fieldsets and he was able to do magical things. I will see if he has those examples somewhere online. In the meantime google is your friend. E.g. a very quick search brought up this page which has two text inputs on the same line, where both the text inputs have a label (hidden via CSS). http://www.websemantics.co.uk/tutorials/accessible_forms/ (2.2 Simple Login)

Carl