glenngillen / semantic_form_builder

A custom builder (and some helper methods) for creating consistent and accessible forms in rails

Home Page:http://rubypond.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:required conflicts with html5 required attribute

miketaylr opened this issue · comments

The semantic form builder uses :required as a flag to set a class and give a visual clue to users that an input is required. However, it also creates a required attribute on the input which invokes the HTML5 constraint validation model (currently in newer Webkits and Opera). This leads to an inconsistent and unintended experience across browsers.

Please consider changing :required to something else.

http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-required

Mike,

Thanks for this. I'm hoping to dedicate some time over the next month to re-evaluate this project and fix it to be fully HTML5 compliant. In the interim, if semantic_form_builder isn't quite fitting your needs I'd take a look at the formtastic plugin as they've done some excellent work extending upon the original intentions of semantic_form_builder.

Cheers,

Glenn