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
Display tooltips for buttons, especially those without text #4185
Conversation
The best candidate is `aria-label`, followed by `description`. Most of the existing elements already have these defined, so try to route it as the tooltip instead of having to explicitly define tooltips everywhere through a redundant `title` or <Tooltip> tag. Minor side-effect: This will cancel off any effect from a parent <Tooltip>, i.e. might confuse future developers who are trying to do "<Tooltip><Button></Button></Tooltip>".
<MenuButton> is not from us, so the automatic tooltip from the previous commit does not apply here.
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.
Nice!
@@ -164,6 +164,7 @@ const Header = (props: Props) => { | |||
<Menu> | |||
<MenuButton | |||
aria-label={__('Publish a file, or create a channel')} | |||
title={__('Publish a file, or create a channel')} |
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.
I think the tooltip needs to be shorter.
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.
I think that sentence is fine
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.
Isn't there a possibility that it hides other text or gets cut?
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.
I think it would look better if it is made "Publish Your Content!" or "Publish Freedom" or something like that. Or just "Publish Content".
This is still my personal opinion. I don't like long tooltips, they look a bit messy to me.
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.
Nope, they sit on top of all the other text, so it won't get hidden.
Do you have a picture/gif of the tooltipw btw? |
Okay.
…On Wed, 13 May, 2020, 7:50 PM Sean Yesmunt, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ui/component/header/view.jsx
<#4185 (comment)>:
> @@ -164,6 +164,7 @@ const Header = (props: Props) => {
<Menu>
<MenuButton
aria-label={__('Publish a file, or create a channel')}
+ title={__('Publish a file, or create a channel')}
Nope, they sit on top of all the other text, so it won't get hidden.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJI5H2YNPU6HVZZSS5IMZLRRKUBHANCNFSM4M6XKESA>
.
|
PR Checklist
Please check all that apply to this PR using "x":
PR Type
What kind of change does this PR introduce?
Fixes
Issue Number: Fixes #3465
What is the current behavior?
Some buttons (especially those without text) is lacking tooltips.
What is the new behavior?
Display tooltips for those elements.
Other information
The strings are already in place, so code was added to route the data to
title
for it to appear as tooltip.Refer to commit message for full details.