Links do not have descriptive text - Aria Labels don't work ?

CodePen: https://codepen.io/Smgy94/pen/LYaXBJr Hey Guys, Im getting the "Links do not have descriptive text" error in my Lighthouse report. I don't want to change the copy in the CTA "Learn more" I thought I could solve this by adding aria labels to each link but it doesn't seem to be working ? anyone know if this can be solve via aria or will I have to use .sr-only class for link names ? Thanks!
No description
2 Replies
MarkBoots
MarkBoots•9mo ago
yea, lighthouse thinks the "learn more" is to generic https://developer.chrome.com/docs/lighthouse/seo/link-text you could try to add more descriptive text in a span that you visually hide
<a href="./class-muay-thai.html">Learn More<span class="sr-only"> about Muay Thai</span></a>
<a href="./class-muay-thai.html">Learn More<span class="sr-only"> about Muay Thai</span></a>
smgy94
smgy94•9mo ago
Perfect thanks i'll take that approach. I just found it weird that aria-label didn't fix it 🤔 Thank you Mark!
Want results from more Discord servers?
Add your server