New issue
Advanced search Search tips

Issue 908065 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Show tooltip only if title="..." does not match the visible text

Project Member Reported by phistuck@gmail.com, Nov 23

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3616.0 Safari/537.36

Steps to reproduce the problem:
Showing redundant tooltips that show the same text as the rendered text can not only be confusing and awkward, but also cripple the user interface (for example, when the user hovers for a bit on a link and wants to click on the part that the tooltip covers).
I suggest not to show it in cases where the text is fully visible (background and foreground colors are not the same and it is not hidden z-index-wise, not truncated by fragments, overflow or ellipsis).

What is the expected behavior?
No redundant tooltips.

What went wrong?
Redundant tooltips.

Did this work before? No 

Chrome version: 72.0.3616.0  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
Components: Blink>Accessibility
Labels: Needs-Feedback
That is really difficult to compute... background and foregrounds colors not the same, hidden z-index, not truncated by fragments, overflow, ellipsis. 

You basically need to raster the text and then OCR it because fonts could map the glyphs to things that don't match text.

What website is bothering you with tooltips? Perhaps a site is being overly zealous with them.
Perhaps I should have narrowed the scope a bit.
I am working on a project where a request has come up (and implemented in JavaScript) where the tooltip should only show up if the text is not truncated (using ellipsis).
The way to do it is check whether scrollWidth === offsetWidth (or something similar) and if not, add title according to the textContent, otherwise, remove the title (if it happened to have been there before).
This seems like a reasonable request - why would the tooltip show up if the text is completely shown, right?
And you cannot know that in advance (text-overflow: ellipsis exists for a reason), so you have to detect whether it did not fit in runtime, which seems silly, because there is no point in such a tooltip in the first place.
Maybe adding a <element showoverflowtooltip> attribute (woo hoo, bikeshed) to the web platform could solve that, but it seems like a default setting should be applied, at least for potentially ellipsized content.

So to narrow it down - show tooltip if overflow: ellipsis/clip actually added an ellipsis/clipped the text. Is that more reasonable to implement?
Project Member

Comment 3 by sheriffbot@chromium.org, Nov 23

Cc: dtapu...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Triage-M72
Cc: viswa.karala@chromium.org
Labels: Triaged-ET Target-72 FoundIn-72 M-72 FoundIn-71 FoundIn-70
Status: Untriaged (was: Unconfirmed)
As per comment# 0 from the reporter, issue seems to be a Feature request, hence marking it as Untriaged.

Thanks!
Cc: -dtapu...@chromium.org
Components: -Blink>Accessibility Blink>Layout
Trying different component -- this is not an accessibility bug.
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)

Sign in to add a comment