Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Newsletter sign-up form with success message

Josh 1,070

@josh76543210

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

T
Grace 29,310

@grace-snow

Posted

This looks nice

The main areas you could improve this are in terms of form accessibility like

  • programmatically linking the error message to its input. The best way to do that is wrapping the hidden error in an element with an aria-live attribute and unique ID, and using aria-desciribedby on the input pointing to that ID
  • wrapping the thank you in an aria-live div
  • making sure focus moves to the thank you. I'd probably use tabindex -1 on the heading and move focus there on successful submit (and a similar approach on dismiss/reset)

Steps like this really helps assistive technology users

Marked as helpful

1

Josh 1,070

@josh76543210

Posted

Thank you @grace-snow for the feedback. Much appreciated!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord