Only certain standard attributes are directly mapped to properties. This is not the defined behavior for non-standard (custom) attributes.
The forward compatible way of using custom attributes is to prefix them with data-
.
<input ... data-custom_attr="custom_attr_text" ... />
Then they become available in HTML5 compliant browsers as:
element.dataset.custom_attr
But in legacy browsers, you'll still need to use .getAttribute()
.