Bug 210464

Summary: Web Inspector: Don't show tooltips for tabs
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Image] Bug
none
Patch
none
Patch none

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>