Links do not have a discernible name. Lighthouse Fix

A common error in PageSpeed Insights / Lighthouse it's about user experience and accessibility. "Links do not have a discernible name“.

In the given scenario, the error is generated because the links associated with the icons do not have a discernible name. When icon links are used in connection with social networks or other profiles, they should contain a descriptive tag called “aria-label“.

In the theme Voice – Meks, this error occurs most frequently in connection with links "Author Box” from the end of the articles.

The simple solution is to add the tag: aria-label="Nume".

In the "author box” for the Voice theme (theme WordPress developed by Meks), I fixed the problem by changing line 73 in the file template-parts/author-box.php, where I entered the label aria-label.

<a href="<?php echo esc_url($social_meta ); ?>" aria-label="<?php echo esc_attr( $soc_name ); ?>" target="_blank" rel="noopener" class="fa fa-<?php echo esc_attr( $soc_id ); ?>"></a>

The original line that was changed:

<a href="<?php echo esc_url($social_meta ); ?>" target="_blank" class="fa fa-<?php echo esc_attr( $soc_id ); ?>"></a>

After making the above changes to all icons that have links, “Links do not have a discernible name” will no longer be present inLighthouse.

This error that can depunct the score in Lighthouse, is certainly present in other themes as well WordPress developed by Meks or by other developers.

Technology enthusiast, I enjoy writing tutorials and helpful guides for operating systems, hardware systems, programming languages, and mobile phones (iOS, Android). I love to experiment and discover new SEO techniques and web optimization strategies.

Home » Smart tutorial » Links do not have a discernible name. Lighthouse Fix
Leave a Comment