Currently, I'm working on developing a contact form and attempting to utilize the validity API for the first time. Adapting to WCAG2.1 standards has posed some challenges, but I've managed to display errors underneath each field as I code. However, I also need a feature that displays a list of invalid fields at the top of the form when it is submitted.
// JavaScript code snippet goes here...
/* CSS styling rules go here... */
<!-- HTML code snippet goes here... -->
Please disregard the CSS for now, as I will work on refining it when integrating with our website.