On 15 Jan 2004, at 22:15, Tony Collen wrote:

Jeremy Quinn wrote:

Hi All,

I am in the process of getting some Woody forms approved as WAI compliant.

http://www.w3.org/WAI/

While WAI may not be everybody's cup of tea ..... in certain sectors it is a common requirement .... and it is certainly not a bad selling point.


There are three issues which come up regularly with basic Woody forms:

1) Provide an explicit label for each form control. (Level 2)
2) Include default, place-holding characters in edit boxes and text areas. (Level 3)
3) Provide a summary for tables. (Level 3)



<snip>

Issue (2), placeholder text, is slightly more complicated. I think we would have to introduce the concept of a default value to Woody's field markup, with the *option* to automatically invalidate fields which had their default values in.

This would be nice, I know there's a lot of work left to go on the client-side aspect of Woody/CForms.

As far as setting default values in a form, you can do something like this in your flow:

bean = new Packages.foo.myBean();
bean.setBlah("default value");
form.load(bean);
form.showForm("whatever");

It would be nice to be able to set a default value for a field however.

Definitely

I think it is nice to have it in the Form Model, as you will probably want to i18n the default.

And you need to cope with validation ..... is the default value a valid value or not.

This /can/ be handled in Flow but requires a lot of extra work with custom validation .... and becomes a lot more complicated where i18n is involved.

Furthermore, I suspect it would be best if such fields had JavaScript like the following in them, when they have been populated with a default value that is not allowed by the validation:

<input name="sample-field"
    value="default value"
    onfocus="if (this.value == 'default value') this.value = '';"
    onblur="if (this.value == '') this.value = 'default value';"
    etc.
/>

Issue (3) making sure tables have summaries is easy:

<table summary="this is a summary of the table's contents">

Several widgets in Woody make Tables, I propose that their 'hint' could be used as the summary.


+1 for the hint going into the table summary.

cool

regards Jeremy

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to