Design comparison
Solution retrospective
Any feedback is appreciated! 👀
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Desktop layout is really good, it is responsive and the mobile state looks really great as well. The functionality right now is not working? I tried but it doesn't give me a shortened version plus when I visit the given link, the link is broken.
Some suggestions would be:
- Your
header
should be containing thenav
and not the hero-section. A typical layout looks like:
<header /> <main /> <footer />
This way, all element that has content are inside their respective landmark elements.
- Website-logo should not be inside the
nav
since you didn't make it a link. - Website-logo
img
should only be using the website's name as thealt
likealt="shortly"
. Also when usingalt
attribute, avoid adding words that relates to "graphic" such as "logo", sinceimg
is already an image/graphic. - The 3 links after the website-logo should be a link so use
a
tag on them, since they acts as your primary navigational links. I don't know if I would include the 2 links on the right side though. - Hero-section
img
could be usingalt=""
and extraaria-hidden="true"
on it, since it is just a vector image which is decorative. So when an image only acts as a decoration, hide them at all times. - I would wrap the
input
inside aform
. input
element lacks alabel
associated with it. Thelabel
would only be a screen-reader element so using ansr-only
would be really great and the value would describe what theinput
should contain.button
should havetype="submit"
, always state what yourbutton
will be using thetype
attribute.- Right now, the error-message is only being seen visually, to make it more accessibe, add an
id
attribute on theerror-message
, thisid
will be referenced by theinput
. So when theinput
is wrong, a pseudocode will look like:
if ( input is wrong ) input.setAttribute("aria-invalid", "true"); input.setAttribute("aria-describedBy", id of the error-message); else input.removeAttribute("aria-invalid"); input.removeAttribute("aria-describedBy");
This way, user will know that the
input
is wrong because of thearia-invalid
and they will know what kind of error they had made because ofaria-describedBy
which points to the text used in the error-message.- As an addition to making it accessible, you could have used
aria-live
element that announces if theform
submission is invalid or if the shorten api works and produces a result. Just an idea:> - Each result in the shorten api link should not be a heading tag, so don't use
h2
on those, just usep
tag . - On the
advanced statistics
section, those 3 icons are only decoration so use the method I mentioned above to hide them. cta
section background-image should be hidden as well.
FOOTER
- The website-logo should have used an
title
element inside thesvg
. When usingsvg
thealt
attribute won't work since it is only used insideimg
tag.svg
usestitle
element. So you would have this inside thesvg
:
<title class="sr-only">shortly</title>
You will need to make it screen-reader only as well.
- You can use
nav
on the links since those are still your website's navigational links. - Again, since they are links ,you need to make them use
a
tag. Remember that interactive components needs to use interactive elements. - Each social media link should be using
a
tag. - Each
a
tag that wraps social media, it should have eitheraria-label
attribute or screen-reader element inside it. The value for whatever method you will use should be the name of the social media likearia-label="facebook"
on the facebook linka
tag. This way, users will know where this link would take them. - Each
svg
inside the social media link should be hidden since they are only decoration so usearia-hidden="true"
attribute on them.
MOBILE
- Hamburger menu should be using a
button
element since it is a control. Again, interactive components uses interactive elements. By usingdiv
you are making it not-accessible.
SUPPOSING BUTTON IS USED
- The
button
will be using the method I mentioned usingaria-label
attribute or screen-reader element inside. The value will describe what does thebutton
do. The value could bearia-label="navigational dropdown menu"
. - The
button
should have a defaultaria-expanded="false"
attribute on it. It will be set totrue
if the user toggles thebutton
. - Lastly, the placement of the
toggle
and the dropdown is incorrect in your markup. Thebutton
should be placed before the dropdown so that the focus will be correct when the users toggles thebutton
, swap them.
Aside from those, really great work again on this one.
Marked as helpful0 - Your
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