Design comparison
Solution retrospective
I wonder if profesional developers always include all the accesibility options available or its not always necessary.
Community feedback
- @HassiaiPosted over 1 year ago
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 helpful1@dav9goPosted over 1 year ago@Hassiai Thank you very much for your feedback, Im fixing this!
0 - @TanDevvPosted over 1 year ago
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 helpful1@dav9goPosted over 1 year ago@YorkieLT Definetly accesibility is the topic I always pay less attention too, from now on Im doing this, really appreciate your feedback!
0 - @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 class="card">
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 helpful1@dav9goPosted over 1 year ago@0xAbdulKhalid Thank you so much for your feedback , Im definetly fixing this and doing it from now on , thanks
0 - @lucarlePosted over 1 year ago
Not sure If I understand your question. Are you referring to semantic HTML? Or maybe ARIA attributes?
1@dav9goPosted over 1 year ago@locarlesso I guess semantic html is always necesary but I meant more about aria atributes!
0@lucarlePosted over 1 year ago@dav9go Maybe these can answer your question:
Marked as helpful1
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