Design comparison
Solution retrospective
any feedback is welcome :)
Community feedback
- @hassaneljebylyPosted about 1 year ago
hey and well done for finishing the project, to answer your question in order to provide assistive technology users with a logical view of the page structure all sectioning elements
<main>
<nav>
<header>
... must have a definedrole=""
attribute, all sectioning elements automatically define one with the exception of the<section>
tag, it only defines region when it has an accessible name using aria-labelledby or aria-label or title. the perfect fix to this in my opinion is to add an<h2 id="last-news-section-title">(title of your choice to describe the section)</h2>
inside that section the addaria-labelledby="last-news-section-title"
attribute to the section, It will be displayed on the page but you can hide it by addingvisually-hidden
class to theh2
, It won't be displayed but assistive technologies will see it.css
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
I hope this helps :)
Marked as helpful1@faustocalvinioPosted about 1 year ago@hassaneljebyly Thank you Hassan. It makes total sense, I'll try it :)
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