-
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
Tooltips for masthead links #1380
Conversation
Shouldn't this be something more like? <li class="masthead__menu-item">
<a href="{{ domain }}{{ link.url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
</li> What you have is somewhat redundant and doesn't really produce HTML that would give the link more context since you're just duping For example say you have this: main:
- title: "My Masthead Link"
url: http://whatever.com You're going to get this... <li class="masthead__menu-item" title="My Masthead Link">
<a href="http://whatever.com">My Masthead Link</a>
</li> Which is kind of pointless since it doesn't add any additional context to the link. https://www.searchenginejournal.com/how-to-use-link-title-attribute-correctly/ If you use my code: main:
- title: "My Masthead Link"
description: "An awesome website about whatever"
url: http://whatever.com You'd get this: <li class="masthead__menu-item">
<a href="http://whatever.com" title="An awesome website about whatever">My Masthead Link</a>
</li> Which I think is better for the user. |
I added the title attribute on the wrong tag. I meant to add it to the anchor tag actually. Will change it. I suggested about using a separate key |
I was referring to how you were setting a default value for
|
Fair enough. I've updated my commit. I've updated the docs as well. |
Looks good, thanks @maaz93. |
Fixes #1377