W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > August 2010

[Bug 10488] New: <figcaption> captions the <figure> element, or how to use the <figure> element to provide useful text alternatives

From: <bugzilla@jessica.w3.org>
Date: Sun, 29 Aug 2010 01:36:13 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-10488-2486@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10488

           Summary: <figcaption> captions the <figure> element, or how to
                    use the <figure> element to provide useful text
                    alternatives
           Product: HTML WG
           Version: unspecified
          Platform: PC
               URL: http://dev.w3.org/html5/alt-techniques/#hf
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: alt techniques (editor: Steven Faulkner)
        AssignedTo: faulkner.steve@gmail.com
        ReportedBy: xn--mlform-iua@xn--mlform-iua.no
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html@w3.org,
                    faulkner.steve@gmail.com


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

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Sunday, 29 August 2010 01:36:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:21 UTC