Design comparison
Solution retrospective
What could i have done better? (i know o could not implement dark mode)
Community feedback
- @pikapikamartPosted almost 3 years ago
Hey, nice work on this one. Although it is already apparent on the layout that there are stylings missing on this one and the theme toggle is not working at the moment. Also resizing the screen, the layout is not responsive when going into mobile state,
For some suggestions, here are some:
- Adding a
padding
to the top of thebody
tag so that the layout won't be almost touching the ceiling of the screen. - Instead of
div
, usemain
tag on the.container
selector since you are now wrapping the main-content of the site and also,main
tag must be present on a page. - I would go
h1
for thedevfinder
website-logo-text. - For the theme toggle, I don't know if you already have a reference for this one, but you can have a look at my rest api challenge for the theme toggle. A good markup for such theme toggle should be using radio-buttons inside of a
fieldset
with alegend
. - Also, the moon-icon on the theme toggle is only a decorative image. Decorative images should be hidden for screen-reader at all times by using
alt=""
andaria-hidden="true"
to theimg
tag or onlyaria-hidden="true"
if you are usingsvg
instead ofimg
tag. - It would be really nice to wrap the
input
or search-bar inside of anform
tag so that the markup will be clear and just in general, usingform
forinput
that submits data. - The search-icon is decorative, hide it for screen-reader using the method above. Same with the 4 icons on the bottom-part of the card, those are all decorative images.
- Your
button
should be having atype="submit"
on it. Remember that when abutton
is placed inside aform
element, it defaults totype="submit"
. So imagine if you have a close-button inside theform
without specifyingtype="button"
clicking the close-button will submit theform
. Be aware of this kind of scenarios. - Your
input
right now currently lacks associatedlabel
to it or anaria-label
to which will define the purpose of theinput
element. Always include it so that user will know what they need to give on eachinput
. Make sure thatlabel
is pointing to theid
of theinput
as well. - Also, another idea to improve accessibility is to have an
aria-label
announcing whether there is a success result or if there is not. On this one, I saw that when you search for an unknown user, the app still shows information but justundefined
. It would be better to just create an error-message that the user is not valid username and announce in thearia-live
that user does not exist. This way it will be more straightforward. - For each of the user's
img
, you could use the person's name as thealt
value since it makes sense to do so since it will be their profile picture on it. - I would go
h2
for the username since I suggestedh1
on thedevfinder
logo text:> - For those 3 information below the user's info, sine those are "list" of information, using a
ul
ordl
on it would be really nice. On this one, I would go withdl
tag:
<dl> <div> <dt>Repos</dt> <dd>28</dd> </div> </dl>
You would have 3
div
that contains eachdt
anddd
and yes, adiv
is valid direct child of adl
tag but not for the other list tags.- Lastly, just fixing the stylings on the site would be really awesome:>
Aside from those, great job again on this one.
Marked as helpful0@Alejandro1709Posted almost 3 years ago@pikapikamart Thank you so much!! i really appreciate it
1 - Adding a
- @Nam-HaiPosted almost 3 years ago
It works ! nice one
I don't understand if you just didn't implemented dark mode or if you did not know how. I'd guess you know how and you just didn't bother ;)
In case you add no clue, the easy way would just had to change the :root variables of the different color used in the design in the css when the dark mode button is clicked.
Marked as helpful0@Alejandro1709Posted almost 3 years ago@Nam-Hai Thank you! yea i was struggling for the toggle and persist the state since i was not using react
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