Design comparison
Solution retrospective
I honestly don't know what went so horribly wrong when building this... I guess my focus wasn't really there, it was built over a few days.
I have been very unfocused this week and will probably take a few steps away from my code to ease my mind a little!
For now; he's my train wreck of a design! I'm submitting it so when I'm focused, I can revisit this and learn from my mistakes.
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, great work on this one. Though the desktop layout looks different since containers have its children overflowing from its container and on the testimonial section, you forgot to make it in a
row
right now they are stacking on one another. Site is responsive though and mobile state looks fine actually.Some suggestions would be:
- Avoid using
id
to target and style an element since it is a bad practice due to css specificity. Instead, just useclass
to target element. - Avoid using
vh
unit onheight
property as it is not consistent. Try to inspect the layout in dev tools at the bottom, you will notice that when you resize the dev tools height, the layout changes. Instead userem
unit so that it will be consistent. - Also I wouldn't add the hero-section inside the
header
and instead put it in themain
. - Your website-logo should not be inside the
nav
since it is not being treated as a link and do not add it inside theul
. - Only
li
element is allowed as a direct child oful
so on yourheader
remove thediv
inside of thenav > ul
. - Also,
li
parent should beul
and notdiv
. For this one, those 4 links are the only ones that should be insidenav
andul
. - Do not remove the
outline
styling. If you did, always include a visual-indicator on the:focus-visible
for those interactive elements like thebutton
a
tag and others. - Change
section
to usingdiv
sincesection
is not informative when navigated via landmark unless it is being labelled byaria-labelledBy
. - To fix those heights on your layout, for each
.section-image-container
, remove theheight
declaration. This makes the container limited while the image inside it is wider/taller than the parent. learn more
would be better to usea
tag rather thanbutton
since on a real site, this would take a user to a page where they can "learn more" about the section.- For each testimonial card, you could use this markup for better navigation:
<figure> <img src="" alt={person name}> <blockquote> <p> {qoute in here} </p> </blockquote> <figcaption> person name <p> person role </p> </figcaption> </figure>
- Also, each person's image should not be hidden since on a testimonial, you are highlighting a person, thus making them the focal point, hence their image/profile should always be visible.
FOOTER
- Those 4 images should not be include inside the
footer
since normally, you would make thefooter
reusable for different pages on the site, by including the image, it would look odd don't you think. - Website-logo is too big, reduce its size:>
- Those 3 links below the logo could be inside
ul
since those are still your website's navigational 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 and not theimg
inside it. - Social-media image should be hidden since it is only a decorative image so use
alt=""
andaria-hidden="true"
.
MOBILE
- Hamburger menu should be using a
button
since it is an interactive component. - Also, remember that when you are creating interactive components, always use interactive elements.
SUPPOSING BUTTON IS USED
- The
button
should have a default attribute ofaria-expanded="false"
and it will be set totrue
when the users toggles it and vice-versa. - The hamburger
button
should have eitheraria-label
attribute orsr-only
text inside it which defines what thebutton
does. You could usearia-label="navigation dropdown menu"
- The
img
inside the hamburger-menu should have been hidden since it is only a decorative image. - The placement of the hamburger menu and the dropdown is incorrect. The dropdown should be placed after the toggler in the markup so that when the user toggles the
button
, the next focus will be in the dropdown.
Aside from those, great job still on this one.
Marked as helpful1@john-k-phillipsPosted about 3 years ago@pikamart
I want to start by saying thank you so much for such an informative, in-depth explanation, I'm sure you've been told before, but this means more than you realise to me... I really strive to improve and this will give me leaps instead of steps... So thank you so much.
I am moving onto the Blogr challenge with much more focus; thanks to you, I think I can be confident with the HTML on this next challenge.
I have one question, I always feel that the HTML isn't correct, semantically and accessibility. When I search for help in regards to best practices, I can never seem to find what I'm looking for... Do you have any tips on improving my searching skills with HTML? (Aria, Navigation practices, elements I may not be aware of, I.E figure and potentially others).
Thank you again. I hope I can impress with my next project by applying everything you've shared with me.
0@pikapikamartPosted about 3 years ago@john-k-phillips Hey, glad that you find it useful!
For me, I don't really have a resource about this since I just google things out. For example, I would find like "accessible hamburger dropdown" and filter out those result via going through it's code and checking if it makes sense to use them. Usually, I would find answers from w3.org I forgot the other one but it has "accessibility" word in its name.
Also, I try to look up websites and inspect the markup especially from w3.org as well, since they are advocate for accessibility, of course they use best practices for the markup.
I just do those things and test things out as well for my screen-reader(nvda, talkback) if things are working out fine^^
1 - 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