Design comparison
SolutionDesign
Solution retrospective
How would you split the page into Components? This is my "hierarchy"
Main:
|- RatingCard
|- Star image
|- Card title
|- Card body
|- Text
|- RatingNumberComponents
|- five RatingNumberComponent (radio button)
|- Submit button
|- ThankComponent
|- Header
|- img
|- badge (message you selected 4 out of 5)
|- Body
|- title
|- description
Community feedback
- @jairovgPosted over 1 year ago
Hi @vianhg, congrats on your solution; here are some comments that might help you to improve it:
Accessibility and semantics
- Think about if the
star
image adds some meaning to your content, if not, then it should be considered as a decorative image and itsalt
attribute should be removed. - Same comment for the
thanks
image. - You may wrap all your
input
andbutton
elements in aform
one. - The rating elements are not reachable using the keyboard.
Styles
- You're misleading some BEM concepts, I've seen some
modifiers
in your code when they should beelements
instead. i.e.:card--body
should becard__body
. - The submit
button
misses apointer
cursor, this injects ana11y
issue.
Regarding your questions/doubts
- The components structure is correct but, try to refactor it a bit. Take a look at the structure you have for the
RatingCard
andThankComponent
; they are sharing the same structure, as both are aCard
, so think about how using a single reusable component you may achieve the same result.
I hope you find it useful. I'm happy to take another look at your solution if you make some other changes.
Marked as helpful1 - Think about if the
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