Show tooltip only if title="..." does not match the visible text |
||||||||
Issue descriptionUserAgent: 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:
,
Nov 23
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?
,
Nov 23
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
,
Nov 25
,
Nov 26
As per comment# 0 from the reporter, issue seems to be a Feature request, hence marking it as Untriaged. Thanks!
,
Nov 26
,
Dec 17
Trying different component -- this is not an accessibility bug.
,
Dec 17
,
Dec 17
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Nov 23Labels: Needs-Feedback