zwbetz-gh / cupper-hugo-theme

An accessibility-friendly Hugo theme, ported from the original Cupper project.
https://cupper-hugo-theme.netlify.app/
MIT License
301 stars 190 forks source link

Alt text for logo #52

Closed tanyabouman closed 3 years ago

tanyabouman commented 3 years ago

Is your feature request related to a problem? Please describe. Alt text on the logo is an empty string. Setting the alt text to something meaningful is necessary for accessibility.

Describe the solution you'd like I found that it worked well to add a key in the config file called logoAltText and then replace the line that inserts the logo with:

 <img src="{{ "images/logo.svg" | relURL }}" alt="{{ .Site.Params.LogoAltText }}" >

Describe alternatives you've considered Aria text already describes it as a logo, so that might be sufficient, but sometimes the logo has more details that might be helpful to include in alt text.

zwbetz-gh commented 3 years ago

I like the idea. This has been added in fa9968a3ed2ff11a41c36d76cf752f0aa1701e6a