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

read description used only HTML CSS and JS

Enis67β€’ 140

@Enis67

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


that was definitely the hardest challenge for me. Need some tips for getting more productiv and for solve challenges like this easier. NEED lot of advices and tips in JavaScript!

Community feedback

Vanza Setiaβ€’ 27,795

@vanzasetia

Posted

Hello, Enis67! πŸ‘‹

Here are some suggestions to improve your JavaScript:

  • Avoid using var. Use const or let instead.
  • Avoid using JavaScript to add styling (unless you have no other option). JavaScript allows you to change the CSS code using the style property. But, to make debugging easier and improve code maintainability, it’s best to avoid it. Use CSS classes instead.
  • Use js- classes to grab elements within JavaScript.
  • Use regular expression to validate the email address.

Next, some suggestions for the form validation:

  • Each input element must have an accessible name. In this case, you can use aria-label attribute to provide an accessible name for each input.
  • Each of the <p> elements for the error messages should be programmatically connected with the associated <input> element. You can do that by using aria-describedby attribute.
  • Also, each of the error messages should be a live region. You should use aria-live attribute. This way, screen readers will pronounce the error as soon as the region gets populated with the message through JavaScript.
  • Make sure the <p> for the error messages should be empty initially.
  • Learn more β€” How To Create Accessible Form with Simple Design? β€” Vanza Setia

I hope this helps. Happy coding! πŸ˜„

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