-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
masthead logo alt attribute #2529
Comments
On line 8 of -<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt=""></a>
+<a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt="{{ site.masthead_title | default: site.title }}"></a> |
commit and push! ;-) |
Adding the site title as alternate text for the logo is overkill and unnecessary. Right after the logo the site title appears, so for screen readers they're going to see it twice. Alternate text should be used to describe the image. In this case it's not adding any additional context and is simply "decoration", which is why it's omitted. |
This remains an issue with automated accessibility tests, i.e., Lighthouse: https://web.dev/link-name/?utm_source=lighthouse&utm_medium=cli I agree with your point about duplicate text for screen readers. Would it therefore be possible to allow us to define our own |
Can we have the masthead logo alt attribute populated with the "site.title" ?
The text was updated successfully, but these errors were encountered: