Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR code design with vanilla css

dav9goā€¢ 150

@dav9go

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I wonder if profesional developers always include all the accesibility options available or its not always necessary.

Community feedback

Hassia Issahā€¢ 50,670

@Hassiai

Posted

Replace <div class="card"> with the main tag, <div class="text-bold"> with <h1> and <div class="text-soft"> with <p> to fix the accessibility issues. click here for more on web-accessibility and semantic html

To center .card on the page using flexbox, replace the height in the body with min-height: 100vh.

Give .text a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1. Give p a margin-top or h1 a margin-bottom value for the space between the text.

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

1

dav9goā€¢ 150

@dav9go

Posted

@Hassiai Thank you very much for your feedback, Im fixing this!

0
Liam Tanfieldā€¢ 260

@TanDevv

Posted

Hello, dav9go. Great work on this one! Let's talk about a few things in the accessibility report. :)

HTML:

  • Document should have one main landmark | All page content should be contained by landmarks

After your body tag, consider adding landmarks such as, <nav>, <main> and <footer> as a parent to the corresponding content you have where it makes sense. This helps keep your HTML organized and accessible for users using screen-readers, so a win-win for everybody.

(For more information on what is semantic markup, you can read this article by MDN)

  • Page should contain a level-one heading

Every site must have a h1 where it may make sense, (Title) to describe the main content of your page. This provides vital navigational assistance for users that use assistive systems for impairment, helping them easily find the main content they want to get to.

If sometimes your page may not have something you think deems as a h1, we can use what is called visually-hidden by hiding it from visual users but will still be called out by a screen-reader for visually impaired users.

(For more information on this, you can read this article by Webaim)

I hope you find this information helpful. Above all, your solution is great, well done! šŸ˜„

Marked as helpful

1

dav9goā€¢ 150

@dav9go

Posted

@YorkieLT Definetly accesibility is the topic I always pay less attention too, from now on Im doing this, really appreciate your feedback!

0

@0xabdulkhaliq

Posted

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 class="card"> the with semantic element <main> in your index.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 helpful

1

dav9goā€¢ 150

@dav9go

Posted

@0xAbdulKhalid Thank you so much for your feedback , Im definetly fixing this and doing it from now on , thanks

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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