Design comparison
SolutionDesign
Solution retrospective
All feedback is welcome and appreciated! Thanks in advance.
Community feedback
- @vanzasetiaPosted almost 2 years ago
Hi, Ahmed!
Here are a few ways you can do to improve this solution.
- Use the logo image for the "PING." instead of a
<h1>
. - Make "We are launching soon!" as the
<h1>
. - Wrap the email input and the submit button with the
<form>
element. - Add
submit
event to the form and then run the validation. It is better than usingclick
event on the submit button. - Never use the HTML event handler attributes. Here are the reasons.
- It is not a good idea to mix up HTML and JavaScript. It is best to keep them separated so that, you can apply JavaScript to multiple HTML documents.
- It can make HTML and JavaScript hard to maintain. If there are a lot of event handlers, then the HTML starts looking messy.
- It makes it hard to not break the functionality since both are mixed up together. So, whenever you want to refactor the HTML, there is a high chance that you need to break the functionality as well.
- Provide a label or accessible name to the email input. Input must have an accessible name.
I recommend learning to create accessible form validation. Accessible form validation means that the error messages get pronounced by screen readers, each input has a label, and using the correct type of
input
.How To Create Accessible Form with Boring Design?
I hope my feedback helps. Happy new year!
Marked as helpful0 - Use the logo image for the "PING." instead of a
Please log in to post a comment
Log in with GitHubJoin 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