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

Responsive mobile-first solution using Flexbox

P

@alonsovzqz

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What specific areas of your project would you like help with?

  • When adding the blog title I added first the h2 and inside I added an a 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

Papi 230

@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

0

P

@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.

0
Papi 230

@Papi84

Posted

@alonsovzqz you welcome! i am glad & wishing you all the Best.

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