Fixed the input type retrieval

The type should be retrieved through the DOM property rather than the
attribute to ensure that the default value of "text" is used when the
attribute is not there.
It also adds a few case missing normalizations and cleans the access to
a few other properties.
Merge pull request #111 from stof/fix_type_checking

Fixed the input type retrieval