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 10488 - <figcaption> captions the <figure> element, or how to use the <figure> element to provide useful text alternatives
Summary: <figcaption> captions the <figure> element, or how to use the <figure> elemen...
Status: RESOLVED LATER
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 alt techniques (editor: Steven Faulkner) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: LC
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/alt-technique...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 01:36 UTC by Leif Halvard Silli
Modified: 2010-12-06 16:34 UTC (History)
4 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2010-08-29 01:36:13 UTC
This is considered input  to the section "The figure and figcaption elements" in the ALT-techniques document.

Please state  and operate under the assumption  that the <figcaption> element captions the entire <figure> element, and describe how to use <figure> accordingly. Also, it seems 

For reference, see these bugs against the HTML5 spec:

Bug 10480    add role="presentation" on the ASCII fish image
Bug 10483   <figcaption> should be considered the caption of <figure> _itself_
Bug 10484   default roles for figcaption and caption: Make it simple to achieve accessibility

              Background:

FIRSTLY: In a blog comment this summer, you went against ARIA 1.0 when you suggested following coding style for an img element in a photo site: [1] 

     ]] I would recommend that the image have no alt attribute and an aria-labelledby that references the <figcaption> as figure/figcaption are not supported by ATs [snip] This way the image is identified as an image to the user and it is explcitly labelled. [[

Examplified in code. where the use of role's taking the A11Y TF's ARIA mapping proposal [2] as basis:

<figure role="" ><!-- no role -->
  <img src="example.png" role="img" aria-labelledby="caption" >
  <figcaption id="caption">A visible text caption labeling the image.</figcaption>
</figure>

By contrast, ARIA 1.0 recommends an empty @alt in the same use case  and it also has a different use of @role and aria-labelledby. The ARIA 1.0 example: [3]

<div role="img" aria-labelledby="caption">
  <img src="example.png" role="presentation" alt="">
  <p id="caption">A visible text caption labeling the image.</p>
</div>

If the ARIA 1.0 example were to be expressed using a <figure> element instead, then it would have looked like this:

<figure role="img" aria-labelledby="caption">
  <img src="example.png" role="presentation" alt="">
  <figcaption id="caption">A visible text caption labeling the image.</figcaption>
</figure>

SECONDLY: In the alt-techniques document, you make a similar statement:

     ]] When supported by browsers and assistive technology the content of the figcaption will be explicitly associated with the image. [[

The correct thing to say, however, is that the <figcaption> will be explicitly associated with the _figure_ element. I honestly don't know what happens when, as you suggested this summer, the <img> lists the <figcaption> as its caption  would it mean that the <figcaption> stops being an caption to the <figure> element? (See bug 10484  perhaps the default role of <figcaption> should depend on the roile of the <figure>.)

So, taking my above recast of the ARIA 1.0 example as a figure element as starting piont, what kind of explicit association would supporting browsers and assistive technology provide once <figure> is supported? Answer: the only explicit association it would offer, would assocaiton between the <figcaption> and the <figure> element. Thus, we would   in principle, but perhaps not as best practice   not need to use the aria-labelledby attribute which the ARIA 1.0 example uses (and we could also remove role="presentation" due to alt=""). Thus we end up with this:

<figure role="img" >
  <img src="example.png" alt="">
  <figcaption>A visible text caption labeling the image.</figcaption>
</figure>

This example is also pretty much in line with the HTML5's ASCII art figure example  see bug 10480.

Also: if the figure element above did _not_ have role="img", then <figcaption> would caption an element which has no role ... according to the ARIA mapping prposal[2]. (_That_ to me sounds irrantional - but I guess that's another bug against another spec - figure should have _some_ default role, I think.)

[1] http://rebuildingtheweb.com/en/no-alt-text-for-photo-sharing-sites/#c20100729051201
[2] http://www.paciellogroup.com/blog/misc/HTML5/aria-html5-proposal.html
[3] http://www.w3.org/TR/wai-aria/roles#presentation
Comment 1 Michael Cooper 2010-09-02 13:42:58 UTC
Bug triage sub-team notes the task force has an interest in this but does not need to prioritize its work on these. Steve and the reporters can follow the usual process on these.
Comment 2 steve faulkner 2010-12-06 16:34:39 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the tracker issue; or you may create a tracker issue
yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: accepted
Change Description: in process of adding information about figure/figcaption use, am waiting on implemntor feedback and nailing down of role mappings before formalising spec text.
Rationale: agree that this is an important consideration.