Design comparison
Solution retrospective
I ended using CSS Grid for the layout of the mobile and desktop designs. Unfortunately I had a hard time lining up the social-media toggle box to line up with the share button (not sure it's because in CSS Grid?) and in order to line it up visually, I increased the padding but that resulted in a thicker-looking box. How did you guys approach this?
I'd love to hear any feedback or suggestions on what I could improve on! Any insight is greatly appreciated!
Thank you! #happycoding
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Desktop layout looks great, site is responsive and the mobile state looks great as well.
I haven't tackled this challenge yet, but for suggestion, here are some:
- Avoid using
height: 100vh
on a large container like thebody
as this makes the element's height capped based on the viewport/screen's height. Instead usemin-height: 100vh
so that the element will expand if it needs to. - The bold text is not really a heading on this one, because if you read it, it is just an opening text for example, like a blog right. Instead for this one, the
h1
would be better to be a screen-reader onlyh1
.Have a look at this snippet of mine about sr-only heading - Use only the person's name as the
alt
value. - When using
img
tag, you don't need to add words that relates to "graphic" such as "profile picture" and others, sinceimg
is already an image so no need to describe it as one. - The
button
should have a default attribute ofaria-expanded="false"
which then be set totrue
by js, if the user toggles it and vice-versa. Use.setAttribute()
; - The
svg
inside thebutton is only decorative image so use
aria-hidden="true"` on it. - Those social-media links could be inside a
ul
element since those are "list" of links. - Each
a
tag that wraps the social-media icon should have eitheraria-label
attribute orsr-only
text inside it, defining where the link would take them. For example, you should usefacebook
as the value if the link would take the user to facebook. - Social-media image should be hidden since it is only a decorative image so use
alt=""
andaria-hidden="true"
.
Aside from those, great job again on this one.
Marked as helpful0 - Avoid using
- @jma26Posted about 3 years ago
Thanks for the feedback! I missed big time on the accessibility attributes...lol I guess that's what I get without checking.
1
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