W3C home > Mailing lists > Public > public-xhtml2@w3.org > June 2007

Re: Access element test pages

From: Alessio Cartocci <a.cartocci@webprofession.com>
Date: Fri, 1 Jun 2007 03:33:20 +0200
Message-ID: <263f692a0705311833j5ad84392sc60e79bffe84e8c0@mail.gmail.com>
To: "Richard Schwerdtfeger" <schwer@us.ibm.com>
Cc: "XHTML WG" <public-xhtml2@w3.org>, public-xhtml2-request@w3.org, "Steven Pemberton" <steven.pemberton@cwi.nl>
Hallo Richard,
I'm pleased to give more details, because I wrote that notes "on the fly",
along the call.  Now I've changed the access key to "x", to avoid conflicts
for the english version of the browsers (usually the "t" key is reserved to
the "Tools" menu).

Talking about the test: I've placed an <access> element with his "key" and
"targetid" attributes in the head of the document and then verified it in
the DOM tree; page was served as xml to IE6/7, FF 2, Opera 9.2 and Safari
Then, to see effectively the access key working at least in FF and IE I've
tried the following separate ways, according to several aspects of Sjoerd
Visscher's implementations [1, 2].

Firefox is capable of rendering with css plus a Mozilla XBL binding
structure; so <access> is replaced by an <a> element, "key" and
"targetid" (or "targetrole") attributes are replaced by the supported
"accesskey" and "href" set for an internal anchor ("#id"):

<xbl:binding id="access">
              a = this.ownerDocument.createElementNS("
http://www.w3.org/1999/xhtml", "a");
              a.setAttribute("href", "#" + this.getAttribute("targetid") ||
"#" + this.getAttribute("targetrole"));
              a.setAttribute("accesskey", this.getAttribute("key"));

The <a> support have been set previously in another constructor, with XLINK
behaviors, on the same xbl structure.
While the document has XHTML2 declaration and namespace, to work correctly
in FF the <access> element and the linked <section> have their namespace
switched to xhtml.

IE, as I wrote, shows the element in the DOM, but the key events seem not to
work at all without external aid. Trasforming the document via XSLT in
XHTML1.0 Strict <access> (like in FF) can be replaced by an <a> element:

<xsl:template match="x:access">
    <a href="#{@targetid}" title="{@title}" accesskey="{@key}"></a>

I prepared also a single server-side (php) test page [3], that uses a
content negotiation to serve the document: to IE as application/xml, to FF
(Opera, etc.) as application/xhtml+xml. I hope this could be useful.

Best regards,

[1]  http://w3future.com/weblog/gems/xhtml2.xml
[2]  http://w3future.com/weblog/gems/xhtml2b.xml
[3]  http://terrafertile.ch/w3/xhtml2/

Alessio Cartocci
International Webmasters Association / The HTML Writers Guild

2007/5/30, Richard Schwerdtfeger <schwer@us.ibm.com>:
>  Alessio,
> You said you passed an access an element, in a docuement, to IE after
> passing it through an XSLT and you say that it worked. Please be more
> explicit. ... Did it just show up in the DOM or did you also do something to
> add keyboard support for the access key "t."
> Rich
> Rich Schwerdtfeger
> Distinguished Engineer, SWG Accessibility Architect/Strategist
> Chair, IBM Accessibility Architecture Review Board
> blog: http://www.ibm.com/developerworks/blogs/page/schwer
Received on Friday, 1 June 2007 01:33:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:39:59 UTC