Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShaun Russell
Front End Web Development Techdegree Graduate 18,510 PointsWhen refactoring a site for accessibility, is it OK to have an img element nested within an anchor element?
I am using the Audit tab within the chrome developer tools to run a test for the accessibility of my site. One of the warnings it gave me was that my anchor tag was blocking my image. Is this a problem?
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey Shaun,
Personally, I don't see a problem with images nested inside of anchors. I've done this many times to have the image be 'clickable' for the link (which I feel makes the UI much better). So, in my opinion, I would not worry about the 'so-called' error you are receiving.
:)