Form accessibility & custom validation
I need to make the Marketo forms accessible for people with disabilities, so it needs to meet certain requirements for screen readers. Some of the issues with the Marketo forms are:
- Error tooltips are not announced by the screen reader (they need role="alert" or role="tooltip")
- Email addresses are not validated correctly and are allowing "email@domain"
- Form doesn't pass status info on what fields were filled and status of submission upon submission
A complication to this is that I've already implemented this script to enable multiple forms on one page. How can I get the forms to be accessible for screen readers (fix the issues listed above) with the complication of all the form field IDs not being static?