Site logo

Archived topic

Giving the off-canvas menu icon a link name

7 replies · Started by Greg on March 22, 2023

Viewing posts 1–8 of 8

Hi guys,

I've switched the default off-canvas menu icon to a custom SVG using a snippet/filter, but can't figure out if it's possible to give the link a name?

Screenshot of PageSpeed

It's to try and resolve this minor PageSpeed issue:
"Links do not have a discernible name"

Thanks for any help,
Greg

Hi there,

just after the opening <svg> tag try adding a title tag e.g

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 309.72 524.31"> 
  <title>Open menu</title> 
  <!-- the rest of the SVG... --> 
</svg> 

Perfect, that's done the trick, thanks (as ever) for the help.
Greg

Glad to hear that!

Thanks David.

Do you know if there's an easy way to give image links in query loops a title? PageSpeed is now flagging them up. I have a query loop pulling in the 3 most recent news posts on the homepoge. Screenshot link in private info.

Thanks,
Greg

Hi Greg,

Can you try adding alt text for the images in the media library?

Let me know if that works!

Thanks Ying, that's done the trick! :)

I had to import the posts/images from an existing site, and they either didn't have alt text set or were cleared on import.

Glad it works.

Images are better to have alt text to avoid accessibility issues :)

This archived topic is closed to new replies.