Submitted over 1 year ago
Responsive Product Preview Card using Flex Box and Media Query
@SoniBasant
Design comparison
SolutionDesign
Solution retrospective
How to check dimension of the images we get?? Are Canva and Figma useful to check dimenstion? I need dimension of every element; Font, image, button, padding etc.
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML π·οΈ:
- This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to
non-semantic
markup, which lack landmark for a webpage
- So fix it by replacing the element
<div class="attribution">
the with semantic element<footer>
in yourindex.html
file to improve accessibility and organization of your page.
- What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like
<div>
or<span>
- They convey the structure of your page. For example, The
<footer>
typically contains information about the author of the section, copyright data or links to related documents.
HEADINGS β οΈ:
- And, this solution has also generated accessibility error report due to lack of level-one heading
<h1>
- Every site must want at least one
h1
element identifying and describing the main content of the page.
- An
h1
heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
- So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a
sr-only
class to hide it from visual users (it will be useful for visually impaired users)
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
0 - @0xabdulPosted over 1 year ago
Hey there well congrats on completing the Product preview card component π€©
- A Some recommendation for improve your code π
- In Html π·οΈ :
- whenever using the img tag put the alt attribute
- Ensure all informative <img> elements have short, descriptive alternate text and all decorative <img> elements have empty alt attributes (e.g. alt="").
- There are three main ways to add alternate text to an image:
Using an alt attribute i.e.
<img alt="drawing of a cat" src="...">
Using an aria-label i.e.<img aria-label="drawing of a cat" src="...">
Using an aria-labelledby attribute i.e.<img arialabelledby="someID" src="...">
- the html page should be contained one main landmark
- Ex :
<html lang="en"> <head> <title>my page</title> </head> <body> <header> //logo img or heading ect... //Using heading onlyβ </header> <main> //Use only main of the contents </main> <footer> //use copy write discription or challenge d by front end mentor code by mark.. </footer> </body> </html>
- I Hope it's useful for youβ
- Happy Coding
Basant Soni
π€©
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