Update to make data-type attribute take precedence

The type attribute has hard semantics around it at the browser
level, so unless the value is valid, it will be empty.