I am reviewing a site with the Firefox accessibility inspector, and there is one problem that I cannot solve. The following piece of html yields the error, "Focusable Elements Should Have Interactive Semantics", and I cannot figure out why. This is one of a list of captioned thumbnails that link to different pages.
<figure class="col-sm-4" aria-label="{{ label }}" title="{{ title }}">
<a href="{% url 'example' %}" role="img" aria-label="{{ label }}" title="{{ title }}" tabindex="0">
<img src="{{ src }}" class="img-responsive" alt="{{ alt }}" title="{{ title }}" loading="lazy" />
</a>
<figcaption class="text-center bottom-20">
<strong>{{ text }}</strong><br/>
{{ text2 }}
</figcaption>
</figure>
Any ideas? I explicitly added tabindex="0" to the a tag just in case that solved it, but still has this error message regardless of whether or not that is there. I also tried adding tabindex="-1" to the figure, figcaption, and img tags to make them all non-focusable in case that was the problem, but that did not do anything either. From what I can tell, the "a" link is the only focusable element, and the "a" tag is considered interactive semantics, so I'm not sure what the issue is.