Add HTML5 client-side validation to pieforms

Bug #912028 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Low
Unassigned

Bug Description

HTML5 adds new attributes on form elements to enable some basic client-side form validation:

  http://www.marcozehe.de/2011/12/05/from-wai-aria-to-html5-and-back-or-maybe-not/

We should add that to pieforms so that all of our forms get it.

Changed in mahara:
milestone: none → 1.7.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.7.0 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.9.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

This sounds like a great idea - but will have to wait until all the browsers we support can handle the majority of html5 form features

Currently it looks like IE 8 and 9 will cause problems.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

It looks like some of the HTML5 form validation features could work side-by-side with our existing Javascript validation, as a kind of augmentation. Like the "required" attribute, for instance. http://www.the-art-of-web.com/html/html5-form-validation/

But it's probably not worth putting much effort into this just yet, since the JS does an adequate job.

summary: - Use HTML5 client-side validation in pieforms
+ Add HTML5 client-side validation to pieforms
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.9.0 → 1.10.0
Revision history for this message
Robert Lyon (robertl-9) wrote :

Having done some more testing on this - the html5 way of doing 'required' on a field is not as good as the current way.
It alerts you to a field needing filling in but if you scroll up/down the overlaid quote box moves with the scroll in FF.

Also I believe the behaviour of some of the HTML elements vary amongst supported browsers. So if we are going to shift to using HTML5 rather than our inbuilt way of handling these things we will need to take that into account.

Things that will need to be dealt with when switching to HTML5:

* The changing of the doctype from 'html transitional 4.01' to 'html' could muck up a bunch of css styles.

* The HTML way of doing things could be worse than the current js/css way.

* The htmlpurifier doesn't seem to want to accept the 'DOCTYPE html' option by the looks of some Internet searches I did.

Changed in mahara:
milestone: 1.10.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.