Design comparison
Solution retrospective
Vanilla QR Code component
Community feedback
- @atif-devPosted over 1 year ago
Hi Julie, congrats๐ on completing the challenge. Better take care about following points.
- Always check Frontendmentor Report Generator issues after submitting the project for removing errors and warnings. To avoid accessibility issue "All page content should be contained by landmarks" use code as :
<body> <main> ---your code here---- </main> <footer> </footer> </body>
(why
main
matters? Read here) To overcome warning: Page should contain a level-one heading. Create level one heading (<h1></h1>) insidemain
and hide it visually. Although it will be hidden on UI but will be readable for Screen Readers technology.Hope you will find this Feedback Helpful.
Marked as helpful0 - @HassiaiPosted over 1 year ago
Replace <div> with the main tag and <h2> with <h1> to fix the accessibility issues. click here for more on web-accessibility and semantic html
Every html must have <h1> to make it accessible. Always begin the heading of the html with <h1> tag wrap the sub-heading of <h1> in <h2> tag, wrap the sub-heading of <h2> in <h3> this continues until <h6>, never skip a level of a heading.
Give h1 and p the same font-size of 15px which is 0.9375rem and the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
To center the div on the page using flexbox, replace the height in the body with min-height: 100vh. There is no need to give the body a width.
Reduce the border-radius of the img and the div.
For a responsive content, replace the width in the div with
max-width
and give the img a max-width of 100%.Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0 - @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 due to
non-semantic
markup, which lack landmark for a webpage
- So fix it by replacing the element
<div>
the with semantic element<main>
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
<main>
element should include all content directly related to the page's main idea, so there should only be one per page
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!
Marked as helpful0
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