Re: XHTML-Role, ARIA-Role, ARIA-State DTD implementation and validation

Finally I found time to look further into the problem:

I prepared a new test case for it with the following XHTML body:

<div class="checkboxtristate" role="checkbox" tabindex="0" id="chbox1" 
required="true" readonly="true">
     Sign me up for all the weekly rdf and xml newsletters :)
</div>

That's slightly different than the original example in the ARIA-State 
working draft, because "role" and "tabindex" are added while the 
"random" attribute has been removed to reflect the current state of the 
draft plus common usage.

Here is the validating example:

http://learningtheworld.eu/aaa-custom-dtd/
http://validator.w3.org/check?uri=http://learningtheworld.eu/aaa-custom-dtd/

The difficulty lies in the order the modules have to be implemented. If 
my understanding is correct the order has to be like this:

1. bring in the States and Properties module (aaa-qname.mod),
2. add %aaa.attrs.qname to Common.extra.attrib,
3. get the XHTML 1.1 driver,
4. add tabindex to text containers.

With the common usage together with the XHTML 1.1 Role module it gets 
like this:

1. bring in the Role Attribute modules
    (xhtml-role-1.mod, xhtml-role-qname-1.mod,)
2. bring in the States and Properties module (aaa-qname.mod),
3. add %xhtml-role.attrs.qname; and %aaa.attrs.qname; to
    % Common.extra.attrib,
4. get the XHTML 1.1 driver,
5. add tabindex to text containers.

I'm no expert with SGML/DTDs, but to achieve this I had to extend 
%Common.extra.attrib within xhtml11-aaa-base.dtd - all my other attempts 
to leave xhtml11-aaa-base.dtd alone and to extend %Common.extra.attrib 
on a higher level without overwriting the attributes again failed. But 
perhaps somebody will come up with a more elegant solution?

Also I had to set aaa.prefixed to IGNORE (that is set by default to 
INCLUDE both in xhtml11-aaa.dtd and in xhtml11-aaa-base.dtd), and 
aaa-qname.module to INCLUDE (the default is set to IGNORE in aaa-qname.mod).

My customized DTDs can be found here:

   http://learningtheworld.eu/dtd/xhtml-role-state.dtd
   http://learningtheworld.eu/dtd/xhtml11-aaa.dtd
   http://learningtheworld.eu/dtd/xhtml11-aaa-base.dtd

There are still a few inconveniences:

1. It would be more consistent with other XHTML modules to create 
ARIA-State as an add-on module without the bundle with the XHTML 1.1 
driver. But if I'm right and the states and properties must be added 
before the XHTML driver and tabindex extended after it, there need to be 
two modules: a) States and Properties, b) tabindex.

2. A better solution to extend %Common.extra.attrib twice is needed, so 
that the role attribute extension doesn't conflict with the states and 
properties extension. Preferred would be a non-conflicting way where 
%Common.extra.attrib is extended both in xhtml11-aaa-base.dtd and 
xhtml-role-qname-1.mod. Currently XHTML-Role only defines the role, but 
doesn't bolt it onto any element.

3. The manual implementation of both xhtml-role-1.mod and 
xhtml-role-qname-1.mod is a bit of a pain. I would expect 
xhtml-role-1.mod to bring in the qname module, instead it does nothing 
(and even says so in a comment). Probably the HTML WG had good reason to 
create it that way, but I wonder why? "Does nothing" reads like a joke.

4. The "triple-a" in "xhtml11-aaa.dtd" or the default namespace leads to 
some confusion because people think it is related to triple-a WCAG 
conformance. Calling it xhtml11-state.dtd with a "state" default 
namespace would be less ambiguous.

Please note that in the example ARIA-Role is included like this:

<link rel="meta" 
href="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" 
type="application/rdf+xml" title="WAI ARIA-Role Taxonomy" />

The reason is I wanted to avoid namespaces because they still do not 
validate. I understood that the namespace in XHTML 1.0 is FIXED to 
"http://www.w3.org/1999/xhtml", but in XHTML 1.1 xmlns should be 
possible on any element, right? Also in aaa-qname.mod 
%XHTML.xmlns.extra.attrib is extended with %aaa.xmlns.attrib, so I don't 
know why the validator complains...

http://validator.w3.org/check?uri=http://learningtheworld.eu/aaa-dtd-xmlns/
http://learningtheworld.eu/aaa-dtd-xmlns/

I'm not crossposting this to HTML WG because my mails don't get through 
and previously nobody bothered to answer. So Rich, I'm assume it's up to 
you to coordinate the efforts of HTML WG and PFWG to solve these issues.

Thanks and season's greetings,
   Martin


> The doctype declaration in code examples is often incorrect: sometimes 
> only the exclamation mark in <!DOCTYPE is missing, sometimes the URI.
> 
>    http://www.w3.org/TR/2006/WD-aria-state-20060926/#docconf
>    http://www.w3.org/TR/2006/WD-aria-state-20060926/#module_element_xhtml
>    http://www.w3.org/TR/2006/WD-aria-state-20060926/#default_prefix
> 
> Also the W3C validator does not recognize any new AAA attributes, no 
> matter if they are prefixed or not.  Since the validator is indeed 
> capable to handle modular XHTML, I assume there must be an error within 
> the DTD itself.
> 
> Here is a simple test case with the example from "3.1.1.1.1 The Default 
> Prefix," but without the role attribute (which is used in the example, 
> but not incorporated in the example DTD or namespace) [1][2].
> 
> I have tested the State module in combination with the Role Attribute 
> module, and the validator error message is the same as in this simple 
> test case [3][4].  So I suppose the error lies in the namespace module 
> (aaa-qname.mod), alas I couldn't figure out where.
> 
> Also I have noticed in aaa-qname.mod that there is a suggested different 
> approach when AAA is used together with the Role Attribute module, alas 
> it is unclear how this could be achieved.  Since AAA with Role will be a 
> common combination, it would be useful to provide an example in the draft.
> 
> Best regards,
>    Martin
> 
> [1] http://www.hateparade.org/aaa-dtd
> [2] http://validator.w3.org/check?uri=http://www.hateparade.org/aaa-dtd
> [3] http://www.hateparade.org/aaa-xdtd
> [4] http://validator.w3.org/check?uri=http://www.hateparade.org/aaa-xdtd

Received on Friday, 15 December 2006 20:21:35 UTC