Bug 210464 - Web Inspector: Don't show tooltips for tabs
Summary: Web Inspector: Don't show tooltips for tabs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-13 16:01 PDT by Nikita Vasilyev
Modified: 2020-04-14 16:59 PDT (History)
3 users (show)

See Also:


Attachments
[Image] Bug (84.50 KB, image/png)
2020-04-13 16:01 PDT, Nikita Vasilyev
no flags Details
Patch (2.12 KB, patch)
2020-04-13 16:12 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (1.68 KB, patch)
2020-04-14 14:28 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2020-04-13 16:01:38 PDT
Created attachment 396350 [details]
[Image] Bug

Steps:
1. Hover over Elements tab
2. Wait for 3 seconds

Actual:
"Element" tooltip is shown.

Expected:
No tooltip is shown.

Notes:
The tooltip here is redundant. It doesn't display any new information. We no longer truncate tab names so the tooltip should be removed.
Comment 1 Nikita Vasilyev 2020-04-13 16:12:25 PDT
Created attachment 396353 [details]
Patch
Comment 2 Devin Rousso 2020-04-14 14:08:28 PDT
Comment on attachment 396353 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396353&action=review

> Source/WebInspectorUI/UserInterface/Views/TabBarItem.js:-133
> -        this._element.title = this._title;

I think a simpler solution would be to just not use the `displayName` for the `title` if a `title` isn't provided in the constructor.

instead of
```
    this.title = title || displayName;
```
we could just have
```
    this.title = title;
```

We should still allow non-pinned `WI.TabBarItem` to set a `title` if they desire something different from the `displayName`.
Comment 3 Nikita Vasilyev 2020-04-14 14:28:44 PDT
Created attachment 396462 [details]
Patch
Comment 4 Devin Rousso 2020-04-14 15:53:53 PDT
Comment on attachment 396462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396462&action=review

r=me

> Source/WebInspectorUI/ChangeLog:11
> +        Don't show tooltips when they match the name of the tab. We no longer truncate tab names
> +        so the tooltip is redundant.
> +
> +        Only show tooltips for settings and search (pinned tabs).

This is no longer an accurate description of this change.

> Source/WebInspectorUI/UserInterface/Views/TabBarItem.js:134
> +            this._element.removeAttribute("title");

Why do we have to remove the attribute if it's an empty string?  Is it bad for accessibility to have a `title=""` or even just a `title`?
Comment 5 Nikita Vasilyev 2020-04-14 16:24:47 PDT
Comment on attachment 396462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396462&action=review

>> Source/WebInspectorUI/ChangeLog:11
>> +        Only show tooltips for settings and search (pinned tabs).
> 
> This is no longer an accurate description of this change.

From the user perspective, this is still accurate. I'm writing this changelog for users first.

>> Source/WebInspectorUI/UserInterface/Views/TabBarItem.js:134
>> +            this._element.removeAttribute("title");
> 
> Why do we have to remove the attribute if it's an empty string?  Is it bad for accessibility to have a `title=""` or even just a `title`?

We don't have to, it's just odd.
Comment 6 EWS 2020-04-14 16:58:38 PDT
Committed r260108: <https://trac.webkit.org/changeset/260108>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396462 [details].
Comment 7 Radar WebKit Bug Importer 2020-04-14 16:59:13 PDT
<rdar://problem/61797344>