Home
The Toolkit for Online Communities
15903 Community Members, 0 members online, 2480 visitors today
Log In Register

.LRN Zen Project: Standards

OpenACS Home : xowiki : .LRN Zen Project: Standards
Search · Index
Previous Month May 2013
Sun Mon Tue Wed Thu Fri Sat
28 29 30 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 (2) 24 (1) 25
26 27 28 29 30 31 1

Popular tags

ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bugtracker , COMET , cvs , debian , emacs , FreeBSD , includelets , install , installation , installers , javascript , libthread , linux , monitoring , nginx , oracle , osx , patches , performance , postgres , pound , redhat , selenium , ssl

No registered users in community xowiki
in last 30 minutes

Contributors

OpenACS.org

.LRN Zen Project: Standards

.LRN/OpenACS Zen Standards  

 

Administration

    Steps to Cleanup (Zenify) a Package Page

    1. View Page in a browser (preferably FireFox 2+) and view source of page
    2. Check Doctype
    3. Check Title (optional)
    4. Check for H1-Hn and make sure they are in order. If not, make them so.
    5. Close all HTML tags
    6. Make sure there is no inline CSS
    7. Add an ALT attribute for IMG tags
    8. Add a TITLE attribute for A tags as necessary
    9. Check all user visible text and make sure it is using message keys instead of text
    10. If page has a form, make sure it is using formbuilder
    11. If page has data in tabular format, make sure it is using listbuilder
    12. Run accessibility tests

    Doctype

    1. First target: Validated HTML 4.01 Strict
    2. Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    3. Background: Choosing a DOCTYPE . Why not XHTML? See http://www.hixie.ch/advocacy/xhtml

    Basic Page Requirements

    1. Title: should be in title tag, breadcrumbs, and h1 at top of page.
      1. To accomplish that, ADP pages using the <master> tag should pass the following properties. <property name="title">Page Title</property>
        <property name="context">{ { breadcrumb_url link_title } .. last_breadcrumb_element, title unless there is a good reason for it to be someting else}</property>
        You don't need to manually build the conxtext bar UNLESS you want to include a URL that is not part of the site map. In other words, the context for 99% of pages should just be a one element list containing the page title or other text you want as the last element of the context bar.  (DAVEB)

        Title and context variables are set in the tcl file so the property call looks like this
        <property name="title">@title;noquote@</property>
        <property name="context">@context;noquote@</property>
    2. Use message keys instead of text. http://openacs.org/doc/i18n-convert.html 

    Applying new CSS and HTML clean-up 

    Form Builder and Template

    1. All forms will use the default form template (standard.adp) now. 
      1. Therefore, there is no longer a need to have  the "style" attribute in the formtemplate tag.  (i.e. <formtemplate id=zen style=inline>). We can get rid of this attribute on all forms that currently use it.
      2. Instead, there are different css classes that can be applied to all forms to get the same effect of inline.adp, plainest.adp, and other form templates while actually using the zen-ified standard.adp.  The form class to be used is passed in the "html" parameter of the ad_form proc.                                                                     
        • Example:
          • ad_form -name "zen" -method post -html {class vertical-form}..... -form {....}
          • This will render: <form name="zen" method="post" class="vertical-form">
    2. List of form classes available and example URLs.
      • Note: Example forms are checked into the 5.3 branch. Example files are listed below.
      • margin-form : This is the default form class if none is passed to the ad_form proc
        • /packages/theme-zen/doc/forms/index*
      • vertical-form
        • /packages/theme-zen/doc/forms/form-vertical*
      • inline-form : Replaces inline.adp
        • /packages/theme-zen/doc/forms/form-inline*
    3. Example:
      • Change:
        • <formtemplate id=zen style=inline>
      • To:
        • <formtemplate id=zen>
        • And modify the tcl ad_form call to pass a class to the form, so it will be like this:
          • ad_form -name "zen" ... -html {... class inline-form}.... -form {...}
    4. If the form you working on started out as <formtemplate id="zen">, then you probably don't need to change the formtemplate or the form class. The defaults will  most likely work fine. Look at the page in a browser and see how it is rendered.  If you have any questions about which formtemplate to use, ask Mark Wylie.
    5. Fieldsets and Fieldset Legends
      1. Legends need to be short, there is no line wrapping for legends
      2. more fieldset and legend info coming soon
    6. If you have to hand code a form, it should look something like this:
    <form class="margin-form">
    <fieldset>
    <legend>Short Legend</legend>
    <div class="form-item-wrapper">
    <div class="form-label">
    <label for="first_name">First Name</label>
    <div class="form-required-mark">(required)</div>
    </div>
    <div class="form-widget">
    <input type="text" name="first_name" id="first_name" size="30" />
    </div>
    <div class="form-help-text">
    <img src="images/icons/info.png" alt="info" width="16" height="16" /> Some info text
    </div>
    <div class="form-error">
    <img src="images/icons/exclamation.png" alt="error" width="16" height="16" /> This field was in error
    </div>
    </div>
    <div class="form-button">
    <input type="submit" name="formbutton:submit" value="submit" />
    </div>
    </fieldset>
    </form>

    Using sections in ad_form

    The "section" element property is not longer supported. See Web_Forms for an example of how to use sections in ad-form.

    List Builder and Template

    When creating a list template that contains links, provide a title attribute (with a meaningful and localized text) for each of them (checkpoint 13.1 - priority 2 - AA). Example:

    template::list::create \
        -name messages \
    -html [list summary "Summary title"] \
    -caption "Optional caption" \
        -multirow messages \
        -page_size $page_size \
        -page_query_name messages_select_paginate \
        -pass_properties { moderate_p } \
        -actions $actions \
        -elements {
            subject {
                label "[_ forums.Subject]"
                link_url_col message_url
                link_html {title "[_ forums.goto_thread_subject]" class "myclass"}
            }
    }

    This is also true for actions list. Example:

    lappend actions [_ forums.Post_a_New_Message]\
    [export_vars -base "${base_url}message-post" { forum_id }]\
    [_ forums.Post_a_New_Message]

    New Parameters

    • caption - optional
    • summary - required for AA. There is a default in place: "Data for %list_name%" 

     W3C Web Content Accessibility Checkpoints

    Zen aims at being Level AA compliant (priority 2 checkpoints):

    Tools for Checking Accessibility

    Web Developer (Firefox):

    Colour Contrast Analyser ( Firefox):

    Fangs, the Screen Reader Emulator (Firefox)

    Hera (automatic and manual reports)

    WebXact (if HERA is not working)

    Others tips

    Important Checkpoints