Design comparison
Solution retrospective
- When adding the blog title I added first the
h2
and inside I added ana
tag. I'm not completely sure if that's correct or if there's another approach for it keeping in mind that I still want it to be accessible.
Community feedback
- @Papi84Posted 3 months ago
Hi Alonso,
amazing job you doing!
using an <h2> element is a good choice as it helps with semantic structure and accessibility. However, placing an <a> tag inside an <h2> is a common and valid approach if you want the title to be a clickable link. This approach can be both accessible and SEO-friendly, as long as it’s implemented correctly.
Here are a few considerations to ensure both accessibility and best practices:
==>Semantic HTML: Ensure that the <h2> element accurately reflects the hierarchy of your content. If the blog title is a major section heading, then <h2> is appropriate. If it’s a subheading under another section, consider using <h3>.
==>Accessible Links: When using an <a> tag inside the <h2>, make sure the link text is descriptive enough to provide context about where it leads. For instance, “Read more about [Topic]” is more descriptive than just “Click here.”
==>Aria Roles: If you need to add extra accessibility features, consider using ARIA roles and properties as necessary, but usually, semantic HTML elements and descriptive link text are sufficient.
==>Focus Management: Ensure that your links are keyboard accessible and visually distinguishable from surrounding text. This includes having a clear focus state for users navigating via keyboard.
If you have any specific concerns or additional questions about the implementation or need further assistance, please let me know!
Best regards, Papi84
Marked as helpful0@alonsovzqzPosted 3 months ago@Papi84 thank you so much on such a detailed response. I really appreciate it and it's super clear, I'll make those changes and will keep them in mind for future challenges.
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