@Papi84
Posted
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 helpful
@alonsovzqz
Posted
@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.
@Papi84
Posted
@alonsovzqz you welcome! i am glad & wishing you all the Best.