Design comparison
SolutionDesign
Solution retrospective
Any feedback is appreciated!
Community feedback
- @hardy333Posted about 3 years ago
Hey, good job but try to make accordion responsive on mobile screen sizes.
Good Luck.
4 - @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Layout looks great in desktop, though your mobile transition is too early. Right now, at point 1200px I think, you are already showing the mobile state which should not be, since desktop layout could use more of those. The mobile layout however looks great.
Some other suggestions would be:
- Avoid using
vh
unit for theheight
property as this is not consistent since it only relies on screen's height. Instead, userem
so that it will be consistent for all users. - Use the
main
element as the parent container to wrap all the content. It should be after the#root
selector, this way all elements that has content will be inside a landmark element. - Each
img
on the should be hidden since they are all just decorative images. So it would be great for them to usealt="'
and an extraaria-hidden="true"
attribute on theimg
tag. - I wouldn't use
h1
on theFAQ
word, instead theh1
would be better if it was a screen-reader only text, defining what is the main content is all about, then thefaq
would beh2
. - On the accordion, always use interactive elements for interactive components. Using
li
alone to handle the event is not really great nor accessible. I know that using and learning react is great, but before you dive into things like this, you must first have a strong fundamentals about html and css. Because the last thing you want to be is a react developer that uses wrong markups and wrong stylings. - If you don't want to use
button
witharia-expanded
for the accordions, usedetails
element on it. It is native element that is suited for this kind of components, it is already accessible. - Your arrow
button
uses a wrongaria-label
value. To be honest, you don't need to usebutton
for thisimg
. It would be better if this arrow-image is used on the::after
of the accordion element. You don't need to use html element on that one. - Lastly, try to make it as responsive as you can. Adjust as well the transition point of the media query.
Aside from those , great work still on this one.
0 - Avoid using
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