Home Forums Newsletter Developers Making Forms WCAG compliant with label for="" in the generated HTML

Viewing 1 post (of 1 total)
  • Author
  • #243136


    The auto-generated forms, have missing form labels. Is it possible to make a minor change in your code to be compliant? I would prefer not to do a custom form to accommodate this requirement.
    In the example below for firstname, after adding an ID=”nn” for the input field, the label would change from <label>First Name</label> to <label for=”nn”>First Name</label>.


    <div class=”tnp-field tnp-field-firstname”><label for=”nn”>First Name</label><input class=”tnp-firstname” type=”text” name=”nn” required></div>


Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.