Responsive contact form using Tailwind CSS
Design comparison
Solution retrospective
I'm definetly proud of using fresh resources (TS & Tailwind) on this project but at the same time, not relying heavily on fancy dependencies and writing all the logic with straight-up TypeScript code. However, i shall try to properly structure and write the logic before full-on focusing on stylizing the page.
What challenges did you encounter, and how did you overcome them?I'd say they were mostly architectural: i had almost a headache when trying to use a single, custom hook to handle input values & errors while not use to some "barriers" TypeScript imposes on React. However it was a part of the process, and re-writing some code (specifically, the hook, now 2 separate hooks) from scratch really helped me out.
What specific areas of your project would you like help with?Is professional, adequate Form validation on React this boring? I mean, i know React for a year now and I don't know if I underestimated this project's scale, but to be more specific:
I want to know if the approach i used to handle the Form on App.tsx is good enough, in a code-wise than markup-wise sense.
Community feedback
- @kaamiikPosted 3 days ago
- Wrap all of your content inside a main element.
- The error of the first and last name are not align properly.
- Add a padding to top and bottom of the body to prevent stick the card to top and bottom.
- Your asterisks need a
.visually-hidden
text like required to tell the screen reader users about this sign.
- Your inputs need
aria-invalid
attribute,aria-describedBy
attribute to link with the error message,autocomplete
attribute.
- Your email input type should be email.
- The best element for group of radio buttons is
fieldset
with alegend
inside of it. Read this: https://www.w3.org/WAI/tutorials/forms/grouping/
This challenge is really important in terms of accessibility and you have to consider it next to design and JS too.
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