Design comparison
SolutionDesign
Solution retrospective
any suggestions on how i can improve my code i'm welcome
Community feedback
- @vanzasetiaPosted over 2 years ago
Hi, Rafael Elias! 👋
Nice work on this challenge! 🙌 Your solution is responsive and looks great! 👍
I like the idea of having the "shaking" animation. Also, more importantly, the animations are turned off when the users prefer not to see them. Amazing! 👏
But, two things can be done better.
- Firstly, the alert messages are not getting pronounced by screenreaders as soon as they are visible. So, to make the alert messages accessible there are a couple things you need to do.
- First, leave the
error-message
empty (no text content should exist on the HTML). - Second, add
aria-live
attribute. If the error messages appear when the users submit theform
the value for thearia-live
ispolite
. But, if it is a "live" validation then useassertive
so that the error message gets pronounced as soon as possible. - Third, add a unique
id
to eacherror-message
. - Then, add
aria-describedby
attribute to eachinput
element. The value of thearia-describedby
is theid
of each error message element. - Lastly, with JavaScript, show the error message.
- First, leave the
- There should not be text in
span
anddiv
alone whenever possible. Instead, wrap the text with a meaningful element like a paragraph element.
That's it! I hope this helps! 😊
Marked as helpful0@RafisEliasPosted over 2 years ago@vanzasetia Thank you very much for the feedback, I will try to implement all the tips you gave me. thank you so much/
0 - Firstly, the alert messages are not getting pronounced by screenreaders as soon as they are visible. So, to make the alert messages accessible there are a couple things you need to do.
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