Results 1 to 3 of 3

Thread: WCAG 1.0 Priority Level 3 issue with form validation Javascript

  1. #1
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default WCAG 1.0 Priority Level 3 issue with form validation Javascript

    I have successfully installed and tested the DD form validation script:

    Required field(s) validation v1.10- By NavSurf

    I have also been aiming to get my form page to pass WCAG 1.0 Priority Level 3 which, in relation to forms, states the following requirement under 10.4:

    10.4: Until user agents handle empty controls correctly, include default, place-holding characters in edit boxes and text areas. [Priority 3]
    For example, in HTML, do this for TEXTAREA and INPUT.


    Presently, I can acheive Priority 3 validation via online automated testing for the form's INPUT fields by using:

    value="Title here"

    inside the INPUT string for a text field, like this:

    <span class="formtexttab2">
    <label for="Title">Title</label>
    <span class="redasterix">*</span>&nbsp;</span>
    <input class="txt" id="Title" type="text" name="Title" value="Title here" style="width: 61px" tabindex="1" />


    This displays 'Title here' as text in the text box field for all to see but of course, now the DD javascript Required Form Fields Validation script won't work because, by using value="Title here", it thinks that the text area has been filled in by the user (it has been 'filled in' - but not by the user).

    Is there a way I can pass WCAG.1.0 AAA validation and have the JS validation script work without using the value="Title here" method for INPUT and TEXTAREA?

    Your kind assistance in this matter would be greatly appreciated.

    The page I am working on can be found here:

    http://www.bodmin.gov.uk/Website/Contact_Webmaster.asp

    Many thanks - and thanks to all who have helped me in the past.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Find:
    Code:
    			case "textarea":
    				if (obj.value == "" || obj.value == null){
    Replace:
    Code:
    			case "textarea":
    				if (!obj.value || obj.value === obj.defaultValue){
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Twey,

    You guys never cease to amaze me! You just seem to know what to do all the time. A hearty WELL DONE and many thanks for helping me out today!

    Best wishes

    Jeremy

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •