This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26870 - clarify relationship with title attribute
Summary: clarify relationship with title attribute
Status: RESOLVED MOVED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 alt techniques (editor: Steven Faulkner) (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y, a11ytf
Depends on:
Blocks:
 
Reported: 2014-09-20 00:12 UTC by Liam R E Quin
Modified: 2016-02-26 20:13 UTC (History)
5 users (show)

See Also:


Attachments

Description Liam R E Quin 2014-09-20 00:12:00 UTC
Although use of the title attirbute to convey information through tooltips has accessibility problems (and is inconvenient for many users bcause you can't easily copy the text), older browsers display alt text as a tooltip in the way that newer browsers use title, so it would be helpful for the alt text spec to clarify the difference as part of helping people to write alt attributes.
Comment 1 steve faulkner 2014-10-15 09:12:10 UTC
(In reply to Liam R E Quin from comment #0)
> Although use of the title attirbute to convey information through tooltips
> has accessibility problems (and is inconvenient for many users bcause you
> can't easily copy the text), older browsers display alt text as a tooltip in
> the way that newer browsers use title, so it would be helpful for the alt
> text spec to clarify the difference as part of helping people to write alt
> attributes.

I believe that it is one older browser IE, which stopped this behaviour after IE7.

I have been testing and writing about title attribute issues since 2005. Archived articles [1]. There are also numerous resolved HTML WG issues in regards to the HTML spec advice [2] & [3].


The current alt doc includes the following informative advice:


 "2.6 The img element title attribute

 The title attribute must not be used to provide a text alternative for an  image. The title attribute must not be used to provide a caption for an image;  use the figure and figcaption elements to provide a caption, as described above."

This reflects the intent of the normative requirements in HTML5 which state that the only conforming methods to provide a text alternative for an image is via the alt attribute or the figcaption element (under specific circumstances)[4]

the HTML5 spec also has a normative requirement on implementers[5]:

"The alt attribute does not represent advisory information. User agents must not present the contents of the alt attribute in the same way as content of the title attribute."

and a warning for developers on use of title attribute (in general) for displaying text content to users [6]:

"Relying on the title attribute is currently discouraged as many user agents do not expose the attribute in an accessible manner as required by this specification (e.g. requiring a pointing device such as a mouse to cause a tooltip to appear, which excludes keyboard-only users and touch-only users, such as anyone with a modern phone or tablet)."


What additional value would adding a note about alt being displayed as a tooltip in a legacy browser bring?



[1] http://www.paciellogroup.com/?s=title+attribute 
[2] http://www.w3.org/html/wg/tracker/issues/192
[3] http://www.w3.org/html/wg/tracker/issues/80
[4] http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#guidance-for-conformance-checkers
[5] http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#the-img-element
[6]http://www.w3.org/html/wg/drafts/html/CR/dom.html#the-title-attribute
Comment 2 Liam R E Quin 2014-10-15 18:08:56 UTC
The trouble with telling people what not to do is it can leave them confused about what _do_ do.

In
[[
The title attribute must not be used to provide a text alternative for an image. The title attribute must not be used to provide a caption for an image; use the figure and figcaption elements to provide a caption, as described above.
]]

how about,

[[
Do not use the title attribute to provide a text alternative for an image; always use the alt attribute for that purpose. The content of title attributes is not always made available to users in an accessible way, and is not used automatically when an image is not available.

The title attribute is also not suitable for providing a caption, image or detailed description of an image. The figure and figcaption elements and the longdesc attribute are provided for that purpose.
]]

I think this is less about changing the advice (nor am I doubting the expertise of the people involved) than about changing the way the advice is given slightly, to help people coming to the topic for the first time or who forgot to read the HTML 5 specification in full that day :-)

The current text does talk about title, but doesn't make clear its relationship to alt (or I didn't find it clear, at least).
Comment 3 Shane McCarron 2015-01-29 17:29:42 UTC
Moved into LC1 component as per discussion in HTML A11Y Task Force on 29 January 2015
Comment 4 Charles McCathieNevile 2016-02-26 20:13:01 UTC
This should be part of the work that Liam and Shane do on proposals for text alternatives.

As far as I can tell, title is helpful *in addition to alt* on area attributes, sometimes provides useful information to sighted users *redundantly, in addition to alt* for images, and is otherwise not a lot of help as a text alternative.

There's a potentially separate use case for forms.

I agree we should describe how to use title, rather than just what *not* to do.