Design comparison
Community feedback
- @VCaramesPosted 3 months ago
@EAguayodev Congrats on completing this challenge!
- The "star" icon and "thank you" illustration are purely decorative. So there
alt
tag should be left blank.
- This component would most likely be part of a larger site, which will already have an
h1
heading declared, so "How did we do?" and "Thank You!" would most like be anh2
orh3
.
- Your rating "buttons" need to fix as they were done incorrectly.
To ensure that the "rating buttons" are fully accessible , they need to be built using a
form
.- Everything will be wrapped inside a
fieldset
which will have alegend
that is visually hidden using CSS. - Inside, there should be five
input radios
and eachinput
should have alabel
attached to it to make the “ratings” accessible. - The last thing you will want to include will be a
button
so users can submit their choice.
- The "Submit" button does not need to have an
aria-label
since it contains text indicating what it does.
-
The "thank you" container needs to be announced to screen readers when it appears. So you need to wrap
<section class="thanks__section hidden">
in adiv
and give it anaria-live
next use CSS to give<section class="thanks__section hidden">
thevisibility: hidden
asopacity:
still allows screenreader to pick ups the content.- As for JS, you overcomplicated it. It should only be about 15 lines, max. If you did the rating I mentioned earlier, all your JS needs to do is listen to
submit
from theform
and it will pick up thevalue
of the ratinginput
and add/remove thevisibility: hidden
to the "rating__section" and "thanks__section".
- As for JS, you overcomplicated it. It should only be about 15 lines, max. If you did the rating I mentioned earlier, all your JS needs to do is listen to
-
I didn't check your CSS, but it might needs some updating as well.
Happy
</Coding>
!Marked as helpful1 - The "star" icon and "thank you" illustration are purely decorative. So there
- @EAguayodevPosted 3 months ago
Your code is well structured in the HTML, CSS, and Javascript portions of the project. I found it easy to follow and read so that I could understand how everything functions.
Improvements: add more concise and clear alt texts on the images.
Marked as helpful1
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