Lighthouse is recommending that I address my a href text
Here is the HTML code snippet in question:
<a href="https://twitter.com/@some-name-here" target="_blank" rel="noopener" class="social-icon twitter grayscale"></a>
The issue is that I am simply displaying an image inside the anchor tag using a CSS class:
.social-icon.twitter {
background: url('../images/logo-twitter.png') no-repeat center center;
}
I cannot use <a....>Twitter</a>
because it would disrupt the layout.
I have considered placing a span
with hidden text inside the a
tag, like this:
<a....><span class="hide">Twitter</span></a>
, but I am curious if there is a better solution?
Do you have any recommendations for this situation?