Design comparison
Solution retrospective
No questions. I just realised I need some practice with Flexbox and Grid.
Community feedback
- @perezjprz19Posted almost 3 years ago
@steezyza To add to what @vanzasetia said, if it's a decorative image for which you will leave the alt attribute empty, you can also add aria-hidden = true to the image that way it will be hidden from assistive technologies.
Here is an article on it:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden
Marked as helpful1 - @vanzasetiaPosted almost 3 years ago
π Hi Steezyza!
π Congratulations on finishing this challenge! I have some feedback on this solution:
- Accessibility
- All the page content should live inside landmark elements (
header
,nav
,main
, andfooter
). By using them correctly, you can make users of assistive technology navigate the website easily. In this case, you can wrap all of it withmain
tag,except the attribution. The attribution should be lived inside thefooter
.
- All the page content should live inside landmark elements (
<body> <main> page content goes here... </main> <footer class="attribution"> attribution links goes here... </footer> </body>
img
tag must always havealt
attribute. In this case, you leave thealt=""
empty since all the images are decorative.
<img src="/images/illustration-hero.svg" alt="">
- Headings must be in a logical order. Heading tags can be used by users of assistive technology to navigate the website. If headings are not in a logical order, those users might get confused.
- Never use heading tags to make the text bigger or bold. Use CSS instead.
<h2>Order Summary</h2>
, you can make it as ah1
.- The same as
img
tag that must havealt
attribute, the same goes with anchor tag that must always havehref
attribute.
<a href="/">Change</a> Note: The forward-slash (/) means that it is going to stay it is going to stay on the home page (root).
- Create a custom
:focus-visible
styling to any interactive elements (button
, links,input
,textarea
). This will make the users can navigate this website using keyboard (by usingTab
key) easily. - Always specify the
type
of thebutton
. In this case, you can set the type of them astype="button"
. By doing that, you prevent the button from behaving unexpectedly (like submitting). - Use
rem
or sometimesem
unit instead ofpx
. Usingpx
will not allow the users to control the size of the page based on their needs. - Best Practice (Recommended)
- Put all the styling on a separate CSS file. Inline CSS can cause a problem since it has the highest specificity or priority.
That's it! Like @viniciushenri96 has said to you, keep practicing and hopefully, this is helpful!
Marked as helpful0@steezyzaPosted almost 3 years ago@vanzasetia HTML Semantics, accessibility and use of external CSS files. Got it Vanza, thanks. I will start off another similar challenge later today.
1 - Accessibility
- @viniciusshenri96Posted almost 3 years ago
Hello @steezyza π, always try to put some value in the alt attribute inside the <img> tag for accessibility reasons.
Example:
<div class="top-wrapper"> <img src="/images/illustration-hero.svg" alt="icon illustration hero"> </div>
and always try to make your HTML code as semantic as possible, independent of the project. great job, keep practising.
Marked as helpful0@vanzasetiaPosted almost 3 years ago@viniciushenri96 Just to let you know, it doesn't have to be always, since for decorative images (doesn't add any information), you don't need to put any value to the
alt
attribute.That way the users of assistive technology like screen reader only listen to the meaningful information of the page.
0@viniciusshenri96Posted almost 3 years ago@vanzasetia Thanks, I didn't know about that detail.
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