Object.keys(element#validity) returns empty array in FF20. Replace it with a loop
.form accessor is not set for all elements, only form form fields. Use simple loop instead