Design comparison
Solution retrospective
Thanks for viewing my code!
This is my first project and I really struggled with many aspects of it.
I'm wondering if my code is up to snuff for this project. I feel like I have a lot of redundant code in my text. Are there any better ways to complete this project? My biggest issue that I had was that I wanted to add a transition effect that would fade in my .thanks container but I couldn't get it to work in the long run. Most of the ways that I found to do it in Vanilla JS, I couldn't wrap my head around and it's easier with JQuery but I don't have any experience with it yet. Thank you all for reading!
Community feedback
- @VCaramesPosted almost 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
- To not only improve your HTML code but to identify the main content of you page, you will want to wrap your entire component inside the
main
element.
More Info:📚
- The “icons/illustrations” in this component serve no other purpose than to be decorative; They add no value. There
alt tag
should be left blank and have anaria-hidden=“true”
to hide them from assistive technology.
More Info:📚
https://www.w3.org/WAI/tutorials/images/
- Your ratings should have an
active
state to let users know which rating they have chosen.
- The proper way to build this challenge is to create a
form
and inside of it, the “rating buttons” should be built using aninput radio
(wrap all of them inside afieldset
), since this will prevent additional buttons from being active at the same time, and it should have alabel
element attached to it for accessibility.
More Info:📚
MDN <fieldset>: The Field Set element
- Currently, users can submit without selecting a rating. To fix this, you can do one of the following:
- Make the “5” rating the default rating.
- Create an error message, telling users they need make a section.
- Disable the button until a selection is made.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!🎄🎁
Marked as helpful0@mikej321Posted almost 2 years ago@vcarames Hey there @vcarames! I tried to improve my semantics from my last project but I still have a long ways to go, as we can see! The star really shouldn't have had an alt looking back at it now. I am currently working on implementing your feedback. Thank you so much for the valuable feedback...I am going to read through the articles that you provided me and make some changes!
0@mikej321Posted almost 2 years ago@vcarames Hey there! I made some of the changes you recommended and was wondering if you could review the changes and let me know if there are some more things that could be worked on. The only change I haven't done yet is the main tag, I will have to go through the css and change some selectors first before I do that one. Thanks so much for your help!
0 - To not only improve your HTML code but to identify the main content of you page, you will want to wrap your entire component inside the
- @jbidzPosted almost 2 years ago
Hello Michael, you did a great job on taking this challenge, and I really love the outcome of your design
I noticed in your design that the submit button always bring me to the thankyou page even if I didn't choose a rating. You can fix this issue by adding condition to your submit function like this:
let value; submit.addEventListener('click', function(i) { if (value == undefined) return; // or you can add an alert to tell the user to choose a rate first mainForm.remove() attribution.remove(); selectedValue.innerText = value; thanks.style.display = 'flex'; document.body.append(attribution); })
Marked as helpful0@mikej321Posted almost 2 years ago@jbidz Thank you so much, John! I will implement your suggestion and try to improve this project. Thanks for the great feedback and for helping me!
0@mikej321Posted almost 2 years ago@jbidz Hey there! I made some changes to my code and was wondering if you wouldn't mind reviewing it to see if anymore changes need to be made. Thanks so much for your prior help!
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