Page MenuHomePhabricator

Flow: title attributes (tooltips) aren't useful, some wrong
Closed, InvalidPublic

Description

The W3C says "The title attribute may be set for both A and LINK to add information about the nature of a link. This information may be spoken by a user agent, rendered as a tool tip, ..." But the title attributes of many Flow actions and links simply repeat the text in the anchor, while the Permalink title attribute is just "topic" or "post". We should eliminate title attributes or provide proper ones.

Fixing this would also avoid the Hovercards Beta Feature on enwiki popping up cards for the enwiki articles on Gratitude, Topic, and Post.

I think class Anchor is creating most of the title attributes that duplicate the anchor text. It should not do this! Instead class Anchor should take an optional titleAttr Message|string parameter; if not provided it should not create a title attribute. It could also check if $message is a Message, if so then fabricate a titleAttr message key by appending '-tooltip' to $message->getKey().

Here's an incomplete list of bad title attributes:

Reply in titlebar has no title attribute, it should be "Reply to topic"
Reply under a post has title="Reply", should be nothing or "Reply to this post"
Edit under a post has title="Edit", should be nothing or "Edit this post"
Thank under a post has title="thank' , should be "Thank the author of this post"
(The link title is only "Thank" because the flow-post-meta-actions are capitalized using CSS text-transform: capitalize.)

In the Action menu, the title attributes:
"Edit title" should be nothing or "Edit topic title"
"Summarize" should be nothing or "Provide a summary of this topic"
etc. The same actions in the post action menu should have title="<Action> post".

Permalink in the Topic action menu has title="topic" (message 'flow-link-topic'), in the Post action menu it has title="post" (message 'flow-link-post'). Both are wrong, should be nothing or "Permanent link (URL) to this topic[/post]"


Version: master
Severity: normal

Details

Reference
bz69213

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:41 AM
bzimport set Reference to bz69213.
bzimport added a subscriber: Unknown Object (MLST).

This isn't 100% actionable (it gives an incomplete list). It's not 100% clear (you say it should be nothing or "Edit topic title" for example - it's never good to give 2 choices :))

I would suggest opening bugs where it clearly states the group of links that need attention, and the new required text of the title attribute. This task should be easy for a volunteer to pick up, but I worry this is something that will keep happening without a change in behaviour of the main developers which can be achieved by outlining in future cards what the tooltips should read.

As for the Hovercards problem - that's a problem with hover cards and it should find a better way of dealing with that e.g. use data attributes which explicitly identify a title and allow distinguishing between interwiki links and non-interwiki links.