Added vanilla javascript validation code and made html valid and accessible