Warning:
This wiki has been archived and is now read-only.

TooltipSemanticsAndPresentation

From HTML WG Wiki
Jump to: navigation, search

Tooltip semantics and presentation

Problem statement / use cases

  • for interactive controls and in general, authors have a need to convey tips to users regarding the use and meaning of a control or element
  • often authors do not want to present this information inline to avoid overwhelming users with too much information or information only needed at a particular time
  • independent from tooltips, but often a common presentation for tooltips is the need for authors to present box frame views that float above the document
  • historically implementations have hard coded presentation of above floating views upon hover to the title or alt attribute of an element regardless of the authors intent and this has caused problems for authors and users

Proposed solutions

Semantics provided for tooltips

Introduce a new TOOLTIP element to HTML that is largely parsed like a SPAN element; may contain FLOW contents; and has a default CSS visibility of hidden and is not presented in the normal flow of the document. Since TOOLTIP element may contain FLOW contents including structure elements and embedded content, it permits great authoring flexibility. Authors may use the TOOLTIP element as the first element of any other element.

Similarly a new global @tooltip(URI) attribute would point to another element or document fragment containing a tooltip for an element. When both a @tooltip attribute appears on an element and the initial child element is a TOOLTIP element, the attribute takes precedence over the element. The @tooltip attribute provides authors with a legacy UA transition mechanism since the tooltips can e moved outside the normal flow of the document.

CSS Liaison

To handle the usual visual presentation of tooltips, the HTML WG should liaison with the CSS WG to add a new float property keyword of ‘above’. With this keyword the element is floated outside the normal document flow and appears above or in front of the containing element (no ::hover for example).

Re-implement title hover-float-view

After establishing the parsing and CSS capabilities for this proposal, UAs should generally re-implement the UI for the title of an element appearing as a hover-float-view using the new CSS capabilities and using the CSS content property to generate the contents of the view from the element’s title attribute value.

Discussion and evaluation

Email

WG members should post feedback and other discussion to the WG’s list serve (the URI for the links below provides date information). Search on this email subject.

See also