Re: Validation errors in "Techniques for providing useful text alternatives" page

My doctype is well defined. The code below can be used to see the role and figcaption errors on W3C validation service http://validator.w3.org .
 
Notice the <p> before the figcaption is causing the second error; the figure element does not allow "flow content" followed by "one figcaption" then "flow content". 
However, sometimes there is information like this <p> in the code below related to the figure. Other example can be <p> about the source of the figure data OR hint to click on image to enlarge.  Do you think it ok to add such information in the figcaption? 
It doesn't seem to me a figcaption (by definition in HTML 5 - caption or legend for the rest of the contents...) for the figure.
 


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>test</title>
</head>
<body>
<figure role="group">
<p>Note: The data presented is based relative to the size.</p>
<figcaption>The Regulation of Plants</figcaption>
<img src="images/pntchae.gif" alt="Flowchart - The Regulation of Plants. Details in text following the image"
width="450" height="358">
<details>
<summary>Description for image</summary>
<p>Here you put the long description content</p>
</details>
</figure>
</body>
</html>



>>> Jonathan Avila <jon.avila@ssbbartgroup.com> 4/10/2013 8:43 pm >>>
Did you define the doctyoe as HTML indicating HTML5?  Those sound like a doctyoe declaration issue. 

Jon


On Apr 10, 2013, at 7:58 PM, "Rabab Gomaa" <Rabab.Gomaa@inspection.gc.ca> wrote:



Hello, 
 
I used some techniques from "Techniques for providing useful text alternatives" page however the W3C validation service shows the following errors: 
 
- Error 1: Attribute role not allowed on element figure at this point.
<figure role="group">
-- Role is a solution to provide a programmatically determinable relationship between the image and its description until: http://www.w3.org/TR/html-alt-techniques/#haee ( http://www.w3.org/TR/html-alt-techniques/ )
Also upon the page http://www.w3.org/TR/wai-aria/roles#group Authors SHOULD use a group to form logical collection of items in a widget ( http://www.w3.org/TR/wai-aria/terms#def_widget ) such as children in a tree widget forming a collection of siblings in a hierarchy, or a collection of items having the same container in a directory. 
Is role supported or not for the figure element?
 
- Error 2: Element p not allowed as child of element figure in this context. (Suppressing further errors from this subtree.)
<figure role="group">
<img src="webcam1.jpg" alt="Sopwith house weather cam.">
<figcaption>View from the top of Sopwith house </figcaption>
<p>This image is updated every hour.</p>
</figure>
-- Sometimes there is a note <p> or table and it is not always usable to have them all with the image before or after the <figcaption> 
so what to do? A similar example exists on http://www.w3.org/TR/html-alt-techniques/#hbh 
 
Thank you,
Rabab

Received on Thursday, 11 April 2013 11:52:26 UTC