Design comparison
SolutionDesign
Solution retrospective
What did you find difficult while building the project?
Js was a bit challenging for this one as a beginner in the language, also i lose so much time making the button look nice.
Community feedback
- @vanzasetiaPosted over 2 years ago
Hi there! 👋
The most difficult part of this challenge was to create RegEx to validate each type of input. It's hard to create just a good RegEx. However, I managed to create the RegEx that I wanted and it worked well! 😄
Now, I have a few suggestions for this solution.
- The error icon should be a background image instead of an actual image element.
- Each
input
element should havelabel
. So, I recommend having asr-only
label or making thelabel
as placholder. - Specify the
type
of the button element to prevent it from behaving unexpectedly. - Add an
id
andaria-live
to each error message element, and then addaria-describedby
that point to the error message for each input element. Also, by default the error element should be hidden by making itdisplay: none;
or usinghidden
attribute. By doing this, it will make the error messages get pronounced by the screen readers. - I think
switch
statement would be a better choice in this case. It's much easier to read and understand in my opinion.
That's it! Happy coding! 😁
Marked as helpful1@LakorthusPosted over 2 years ago@vanzasetia thank you very much I will start working In your suggestions! Thank you very much for your feedback!
0
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