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
Only show mouseover-title on text in navigationItem #1098
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The idea for the title on the navigation item is that it shows the entire title if it’s ellipsized – which I would also keep (of course in the example it doesn’t really get across as it’s a very short name). The point in the issue was about the same title being shown on the actions, which seems like duplication. There my question for @skjnldsv if this was because of some accessibility guidelines. :) |
This comment has been minimized.
This comment has been minimized.
f6fcb25
to
e5766a3
Compare
Rebased & Squashed. |
Yup! I would even say that only showing it on the title is fine. :) |
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
e5766a3
to
1597302
Compare
:D ok. So now it's only on title.^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 design-wise! :)
@@ -130,7 +129,9 @@ Just set the `pinned` prop. | |||
class="app-navigation-entry-icon"> | |||
<slot v-if="!loading" v-show="isIconShown" name="icon" /> | |||
</div> | |||
<span class="app-navigation-entry__title">{{ title }}</span> | |||
<span class="app-navigation-entry__title" :title="title"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need a title here as there is some actual visible text content with the exact same information.
https://a11yproject.com/posts/title-attributes/
Short answer: Don’t use them, except in special circumstances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point @juliushaertl, but as @jotoeri said the initial reason why we added the title is to offer a way for mouse-users to see the whole title when it’s longer than the width of the navigation.
So to just fix the issue at hand with it appearing too often but not to cut off the entire functionality, I’d say we should merge this. :) We could then separately look into if we can e.g. only show the tooltip if the text overflows in the first place, if possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me then :)
On forms, @jancborchardt recognized, that the actions-menu of navigationItems shows the form-title on mouseover.
This PR now shifts the title-attribute, into the Title-span, so it is only visible there. Actions-Menu as well as counter do not show the title anymore.
Before (imagine a cursor above the small label):
After: