- From: Chris Ridpath <chris.ridpath@utoronto.ca>
- Date: Mon, 18 Jul 2005 09:58:22 -0400
- To: "WAI ER IG List" <w3c-wai-er-ig@w3.org>
The current draft EARL schema does not seem to have any properties to describe the location of the error. We've discussed these issues earlier on the list [1] and I believe we need these properties and that they should be part of the assertion. Here's my formal proposal: 1) Each assertion that describes an error needs to describe where the error occurs. For example, if an HTML page contained the error "image is missing an alt attribute" we need to state which image. It's not enough to simply state that the content contains an error, you've got to state where it is. 2) The location properties that we use to describe the error is dependant on the accessibility test that is performed. For example, the properties used to describe HTML errors will be different from the properties used to describe errors in Flash or PDF. 3) The location properties should be precise and interoperable. We need to describe as clearly as possible where the error occurred and this should be done in a standard manner so the results may be exchanged with other programs. I suggest that for HTML errors we require that at least one xpath expression be used to describe the accessibility error. 4) More than one location property may be required. For example, to describe a series of links that should be grouped with a list element, properties to identify all the links in the group would be required. The number of location properties is dependant on the accessibility test. If more than one location property is used then each property must have a title to describe itself. 5) Other optional location properties may be included. For example line and column numbers could be included as well as xpath expressions. 6) The location properties apply to the content evaluated and do not necessarily locate the error when the document has been modified. 7) Other location 'hint' properties may be included for finding the error if the document is modified. Example EARL code for discussion: This example locates an image within the document that has failed the test "all images must have an alt attribute". <earl:Location> <rdf:Bag> <rdf:li rdf:parseType="Resource"> <dc:title>key-element</dc:title> <earl:xpath>/html/body/p/img[@src="rex.jpg"]</earl:xpath> <earl:column>24</earl:column> <earl:line>9</earl:line> </rdf:li> </rdf:Bag> </earl:Location> This example locates the anchor that has failed the test "all source anchors contain text that describes the link destination". Here is the problem HTML code: <a href="spending.html"><img src="more.gif" width="30" height="10" alt="image"/></a> The problem is that the alt text for the image does not describe the link destination. <earl:Location> <rdf:Bag> <!-- the anchor element --> <rdf:li rdf:parseType="Resource"> <dc:title>key-element</dc:title> <earl:xpath>/html/body/p/a[@href="spending.html"]</earl:xpath> <earl:column>109</earl:column> <earl:line>9</earl:line> </rdf:li> <!-- the image within the anchor --> <rdf:li rdf:parseType="Resource"> <dc:title>link-text-image</dc:title> <earl:column>165</earl:column> <earl:xpath>/html/body/p/a/img[@src="more.gif" and @alt="image"]</earl:xpath> <earl:line>9</earl:line> </rdf:li> </rdf:Bag> </earl:Location> Comments appreciated. Cheers, Chris [1] http://lists.w3.org/Archives/Public/public-wai-ert/2005Mar/0092.html
Received on Monday, 18 July 2005 14:33:06 UTC