Forum OpenACS Development: Re: forms as columns of template::list

Collapse
Posted by Dave Bauer on
Direct action is MUCH easier in general. Imagine a spreadsheet.

The idea is to reduce the number of steps for a user.

I think in this case an edit button that either

1) opens the form in a new page
or
2) openacs an inline ajax form if the user's browser supports that.

We don't have good guidelines on how to add that type of interaction in an accessible way, so it's hard to say if we could accept that type of implementation in OpenACS or .LRN but you could certainly implement it for a local internal application as long as it met your specific requirements.

Using display template is the best way to accomplish your goal. You don't need a form for every row, but just a form element in each row. I am not sure about the validation requirement for forms and tables though. You will have to look it up.

Collapse
Posted by Emmanuelle Raffenne on
Dave, Luis,

From the accessibility point of view, having one form with a form element in each row is not a good solution.

Collapse
Posted by Luis de la Fuente on
Emma, I agree, this is not a good solution. Maybe it looks better if we don't take into account the accesibility. But if we do...

I will reconsider the user interface.

Thank you for your comments.

Collapse
Posted by Ryan Gallimore on
Hi Luis,

If forms within a table cause an accessibility problem, perhaps you can write your own template for the list using divs.

Create a new adp file in /packages/acs-templating/resources/lists/ and reference it in

<listtemplate name="mylist" style="newlisttemplatefile"></listtemplate>

You can look at list.adp in the directory above for an example. Play with the CSS at /packages/acs-templating/www/resources/lists.css

Good luck,
Ryan

Collapse
Posted by Emmanuelle Raffenne on
Hi Ryan,

I'm afraid that marking up the data with DIV won't solve the accessibility problem. Actually, it would introduce another one. Tabular data has to be marked up using the TABLE element and the corresponding TH/TD and their attributes to associate header cells with data cells.

This is documented in WCAG 1.0 (checkpoint 5.1 and 5.2 - priority 1) and in WCAG 2.0 (technique H51 for success criterion 1.3.1 - level A).

Collapse
Posted by Ryan Gallimore on
Hi Emmanuelle,

Would it be possible, then, to accomplish accessible markup using a custom template, as I suggested above?

Collapse
Posted by Emmanuelle Raffenne on
Valid markup is not a guarantee of accessibility by itself, although it's part of it. Using appropriate markup is even more important. HTML is primarily used to structure the content semantically (not to format it), so each type of data has to be marked up according to its nature.

In this case, the problem is not the template. The default template for template::list produces valid and appropriate markup for tabular data. Using a table to format a form is acceptable from the accessibility perspective (as long as a few rules are followed), but not recommended. The problem here would be to mix the two types of content: the data and the form to modify it.