Re: Changes to DOM3 Events Key Identifiers

Hi Doug & www-dom crowd,

--Original Message--:
>Hi, Folks-
>
>(BCC to potentially affected groups: w3c-html-cg, public-webapps, 
>public-i18n-core, wai-xtech, www-svg, public-forms, public-xhtml2, 
>public-html@w3.org, www-voice... please forward on to any relevant 
>groups or individuals I may have missed, especially outside W3C.)
>
>As editor of the DOM3 Events specification, I made what some may 
>consider to be drastic changes in the most recent drafts:
>  * I changed the syntax of the key identifier strings from "U+xxxx" (a 
>plain string representing the Unicode code point) to "\uxxxx" (an 
>escaped UTF-16 character string), based on content author and 
>implementer feedback.

I think this is a terrible change.

Predominantly for SVG Tiny 1.2 user agents that want to support
DOM3 as well.

In Tiny devices memory footprint is critical and this just introduces
an entire extra set of strings that will bloat the binary for no
added functionality.

The "\uxxxx" syntax is just reminiscent of a programming language
but has little to do with strings returned from DOM APIs. I suppose
you could argue that it's useful in some situations, but my concern
is more about the existence of 2 things that mean the same
thing.

i.e. in a CDF document, the script has to deal with "U+xxxx" or
"\uxxx" dependent on which namespace the element is living
in. I know that you can use 'keyIdentifier' and 'keyValue' to
distinguish them, however that pushes the detection logic
to the wrong place. With the existence of the SVG Tiny 1.2
recommendation using the old identifiers, it's hard to see
the need for this change.

>  * I renamed the "key identifier(s)" feature to "key value(s)".

That is a nice change - and does reflect what the semantics
are. It's also a minimal implementation burden to support both
keyIdentifier and keyValue.

>I've mentioned these ideas before in DOM3 Events telcons, and finally 
>decided to do it, after first consulting with the I18n WG, who generally 
>approved of the scheme (though not without some comments about details 
>that will need to be addressed and resolved).
>
>The new string format should be easier to deal with for developers, and 
>the new name reflects some confusion I've encountered when explaining 
>what "key identifiers" are... the work "identifier" seems to evoke the 
>concept of a unique identifier for a key, when in fact what the feature 
>does is provides the most appropriate value given the state of keyboard 
>modifiers and modes.  I have tried also to clarify this in the prose of 
>the spec.
>
>We are aware that there may already be implementations and 
>specifications that rely on the previous string format and name (as well 
>as links), back from when this was a W3C Note, and we do not make this 
>decision lightly, but we do believe this is the right decision for a 
>stable and internationalized keyboard interface going forward.  For 
>those implementations and specifications that need the previous 
>functionality and name, you may be able to reference the SVG Tiny 1.2 
>specification [2] instead, which does include the old Key Identifiers 
>feature more or less intact from the previous definition, and is a 
>stable W3C Recommendation.

Given a stable recommendation using the old identifier strings, I'd suggest
there's no need for that change. It will simply add to implementor effort
required to support both SVG Tiny 1.2 and DOM3.

It would be interesting to hear of any technically sound argument as to
why '\uxxx' is superior to 'U+xxx' given they both consume the same
number of bytes in script.

Best regards,
Alex

>You can review the changes in the most recent Editor's Draft [1].  The 
>WebApps WG welcomes your feedback to the www-dom@w3.org list.  This 
>specification is still a work in progress, though we do hope to go to 
>Last Call soon, so we are open to suggestions. (Note that the spec is 
>mostly feature-complete, so new event types and other changes may have 
>to wait for the next version, but send them on anyway.)
>
>[1] 
>http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#keyset
>[2] http://www.w3.org/TR/SVGTiny12/svgudom.html#KeyIdentifiersSet
>
>
>Regards-
>-Doug Schepers, on behalf of the WebApps WG
>Editor, DOM Level 3 Events
>W3C Team Contact, SVG and WebApps WGs
>
>

Received on Friday, 30 October 2009 08:06:29 UTC