Sometimes we design a teaser view mode to wrap the entire content in an anchor element. For example:
<a href="/node/1">
<h2>Title</h2>
<div>Short description</div>
<img src="thumbnail.jpg" />
</a>
Contextual links inserts additional links inside this anchor. It is not valid HTML to have anchors inside anchors, and the contextual links do not work. For example:
<a href="/node/1">
<h2>Title</h2>
<div>Short description</div>
<img src="thumbnail.jpg" />
<button>Open configuration options</button>
<ul class="contextual-links">
<li><a href="#">Quick edit</a></li>
<li><a href="#">Edit</a></li>
<li><a href="#">Delete</a></li>
</ul>
</a>
I think the expected behaviour is that the contextual trigger and contextual links are not injected into the DOM if the contextual region is a descendent of an anchor.