koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] prog templates (once again)...


From: Richard Anderson
Subject: Re: [Koha-devel] prog templates (once again)...
Date: Thu, 19 Jan 2006 11:22:14 +1300
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi,

Just a couple of comments...

Paul POULAIN wrote:

* Some html proposals :
- use h1 for page main title
- use h2 for bloc level title
- write forms with : <p><label>text</label><input type="..."></p>, NOT with <table>

I think there is a problem here in that the <label> tag has been used as for formatting (with CSS styles) rather than its intended use as an accessibility aid. So people will find it hard to add in <label> tags to other parts of the forms without distorting the page layout.

When used as an accessibility aid the <label> tag can really speed up how people use forms - especially for radio buttons and checkboxes - you get a big target to click on to check the input.

Rather than apply a style to the <label> tag, I think it would be better to wrap it in <span> with the style applied to the span.

So the above example would be:
<p><span class="label"><label for="somename">text</label></span> <input type="..." id="somename" /></p>

This would enable someone, perhaps me, to add in the accessibility features which the <label> tag enables.

There is an explanation of how the <label> tag should be used at http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL
and
http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-grouping


- use <table> as few as possible (and only where tables are useful)
- don't use <caption> at the beginning of tables, at least not for table title. As most blocs are not table, the caption does not exist everywhere. Use h2 instead

Questions :
* the toggle variable is what the template designers must use when wanting a toggle color in <table> : <!-- TMPL_IF name="toggle" --><td with_toggle1_parameter><!-- TMPL_IF --><td with_toggle0_parameter><!-- /TMPL_IF --> I suggest having a style "toggled" in the css to check that the HTML is correct.

I think it would be nice to add a unique id to each table. This would give a lot more options for people to format how each table looks via some contextual css. I guess in most cases it wouldn't be used but I think it is an easy option to add in at the templating stage.

eg
The class="toggled" in the 2 tables below could easily be made to look quite different via css without having to edit the template.

<table id="table1">
<tr>
        <td class="toggled">text</td>
        <td class="toggled">text</td>
</tr>
</table>
        
<table id="table2">
<tr>
        <td class="toggled">text</td>
        <td class="toggled">text</td>
</tr>
</table>




* begin every "invariant" bloc with <!-- KOHA id="X" --> where X is a number : that is a big task and only useful is someone is ready to develop a "template compiler" (like the translator compiler). The idea would be to : be able to report blocs in a local template to have synch easier. An example :
==============
my local template
<p>something specific to me....</p>
<!-- KOHA id="1" -->
something coming from prog templates, unmodified
<!-- /KOHA -->
<!-- KOHA id="2" MODIFIED -->
Something modified locally, even if it exist in prog templates
<!-- /KOHA -->
<p> something still specific...</p>

the compiler would automatically replace the KOHA id=1 in the template, but let the KOHA id="2" as is, warning the user to check manually for a change.

Does it sound interesting ? It would only is template designers plan not to modify invariant blocs, even for some spelling reasons (like "book bag" in NPL template where default says "basket" !)


This sounds like a great idea.

Cheers,
Richard

--
Richard Anderson
Project Manager
Katipo Communications
PO Box 12487
Wellington
Web:    http://www.katipo.co.nz/
Ph:     (04) 934 4251 (DDI)
        (04) 934 1285
Fax:    (04) 934 1286
Mobile: 021 043 3649




reply via email to

[Prev in Thread] Current Thread [Next in Thread]