W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > July to September 2007

issue 1928: H74 and H75 - why id attributes should be unique

From: Christophe Strobbe <christophe.strobbe@esat.kuleuven.be>
Date: Fri, 20 Jul 2007 11:22:40 +0200
Message-Id: <6.2.5.6.2.20070720103541.035259b0@esat.kuleuven.be>
To: w3c-wai-gl@w3.org

Hi,

I missed the part of the call when issue 1928 [1][2] was discussed (I 
couldn't stay long, and then my phone battery went empty) but the 
minutes say that the issue was reopened.
The proposed response points to a draft failure "Ensuring that all id 
attribute values are unique" [3], but the text assumes that ID values 
are always attribute values. This is true for HTML and XHTML but not 
for all XML vocabularies. For the definition of ID, the XML 
specification does not make assumptions about whether an attribute or 
an element is used as ID:
<quote cite="http://www.w3.org/TR/REC-xml/#id ">
Values of type ID MUST match the Name production. A name MUST NOT 
appear more than once in an XML document as a value of this type; 
i.e., ID values MUST uniquely identify the elements which bear them.
</quote>

With XML Schema, it is possible to define elements of type ID [4].

So if we want to make the failure a bit more general, we can rename 
it to "Ensuring that all values of type ID are unique". In the 
description, "Duplicate 'id' attribute values " would then become: 
"Duplicate ID values ". We could then add a note that in most markup 
languages, ID values are attribute values, for example in HTML and XHTML.
The procedure would become: "Check that all values of type ID are 
unique in the Web page. "

[1] <http://www.w3.org/2002/09/wbs/35422/20070705survey2/results#x1928>
[2] <http://www.w3.org/2002/09/wbs/35422/20070709proposals/results#x1928>
[3] 
<http://trace.wisc.edu/wcag_wiki/index.php?title=Ensuring_that_all_id_attribute_values_are_unique>
[4] with code like <xsd:element name="spam" type="xsd:ID" />  (But 
the XML Schema spec also points out that using ID only for attributes 
is better for compatibility: cf. 
<http://www.w3.org/TR/xmlschema-2/#ID>. With DTDs, only attributes 
could be of type ID.)

Best regards,

Christophe


-- 
Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
BELGIUM
tel: +32 16 32 85 51
http://www.docarch.be/ 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
Received on Friday, 20 July 2007 09:22:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:47:50 GMT