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

Re: @role in SVG

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 10 Oct 2007 18:21:50 +0300
Message-Id: <3E90A3A3-F662-4FFB-A5AC-1F51DD91A8EC@iki.fi>
Cc: www-svg <www-svg@w3.org>, public-xhtml2@w3.org, Simon Pieters <simonp@opera.com>, aleventh@us.ibm.com, Dave Raggett <dsr@w3.org>, public-cdf@w3.org
To: Doug Schepers <schepers@w3.org>

On Oct 10, 2007, at 03:59, Doug Schepers wrote:

> 1) XHTML Namespace
> <svg
>   xmlns="http://www.w3.org/2000/svg"
>   xmlns:xlink="http://www.w3.org/1999/xlink"
>   xmlns:xhtml="http://www.w3.org/1999/xhtml"
>   xmlns:aaa="http://www.w3.org/2005/07/aaa">
>   <g xhtml:role="checkbox" aaa:checked="true">...</g>
> </svg>

> 2) Native Non-Namespaced Attribute
> <svg
>   xmlns="http://www.w3.org/2000/svg"
>   xmlns:xlink="http://www.w3.org/1999/xlink"
>   xmlns:aaa="http://www.w3.org/2005/07/aaa">
>   <g role="checkbox" aaa:checked="true">...</g>
> </svg>

I'm curious why a third way isn't mentioned:
3) Non-Namespaced Attributes for both role and states/properties with  
the latter prefixed with "aria-" (and no qNames in content but opaque  
strings):
<svg
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink">
   <g role="checkbox" aria-checked="true">...</g>
</svg>

Pros:
  * Matches what has recently been proposed for (X)HTML5 and XUL.  
Good both for implementation and author skill portability.
  * Fewer namespaces to deal with (i.e. easier).
  * Copy-paste-friendly.
  * DOM-friendly. (qNames in content are *bad* in the DOM.)
  * Not a chameleon namespace per se. The attributes would be in no  
namespace in XHTML5, SVG and XUL.
  * Semantics and processing can still be imported by normative  
reference from wherever they get defined for HTML5. No need to spec  
all this in the SVG spec.

Cons:
  * Not what the WAI PFWG draft currently says.
  * Unorthodox in terms of XML architecture.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 10 October 2007 15:22:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 February 2010 18:12:47 GMT