W3C home > Mailing lists > Public > w3c-wai-er-ig@w3.org > January 2004

EARL Identifing The Error

From: Chris Ridpath <chris.ridpath@utoronto.ca>
Date: Thu, 15 Jan 2004 11:31:11 -0500
Message-ID: <083701c3db84$fc43be90$b040968e@WILDDOG>
To: "WAI ER IG List" <w3c-wai-er-ig@w3.org>

When an accessibility error is detected in a document you need to identify
the thing that caused the error. For example the particular image that has
no ALT text.

(Note: The thing that caused the accessibility problem I'll refer to below
as the 'item'.)

We've discussed this a bit and Charles has suggested that we use an Annotea
context property[1].

Using an Xpath expression is the most accurate method of describing an item
but it has poor persistence. Make a small change at the beginning of a
document and all the following Xpath expressions may be invalid.

There are 2 (at least) cases when you need to identify an item:

1) You inform the user that there is a problem with an item.
2) User has made a decision on an item (e.g. image does not require a
longdesc).

When you tell the user that there is a problem with an item you can use an
Xpath expression because you are referring to the document right now.

When the user makes a decision on an item, you want that decision to remain
even after the document has changed. For example, if the user moves the
image up or down in the page its longdesc requirement stays the same. Using
an Xpath expression won't work for identifying the items of past decisions.

Here's a suggestion for a practical, but fuzzy, solution to identifying
items in the document. It offers good persistence but may have problems with
accuracy:

Every item may be identified by its element name and an identifier string.
The identifier string is made up from a unique characteristic of the item.

For images the identifier string would be the SRC attribute.

Example: element "img" and identifier "rex.jpg". You can then find the item
within the document using this information.

Note that there may be more that one item in the document that fits this
pattern. In this case they would all be treated the same. The decision (does
not require a longdesc) pertaining to the original item would apply to all
of these.

I've started using this system and it's been working out OK so far. I'm
placing this info in my EARL statements as 'element', 'item' and 'xpath'
attributes of the earl:Subject like this:

    <earl:Assertion>
        <earl:Subject element="IMG" identifier="images/header.gif"
            rdf:resource="#subject"
xpath="/HTML/BODY/TABLE/TR/TD/TABLE/TR[1]/TH/IMG"/>
        <earl:Testcase
rdf:resource="http://tile-cridpath.atrc.utoronto.ca/acheck/checks/checks.htm
l#check8">
            <earl:testId rdf:resource="8"/>
            <earl:message>image does NOT require a long
description</earl:message>
        </earl:Testcase>
        <earl:result
rdf:resource="http://www.w3.org/WAI/ER/EARL/nmg-strawman#Pass"/>
    </earl:Assertion>

I'm interested in hearing comments or suggestions.

[1] http://lists.w3.org/Archives/Public/w3c-wai-er-ig/2003Dec/0002.html

Cheers,
Chris
Received on Thursday, 15 January 2004 11:33:53 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Thursday, 9 June 2005 12:10:42 GMT