Re: accessKey - label and alternative keys

On Wed, 17 Jun 2009 17:38:10 +0200, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de> wrote:

...
> An author can in general note such meta information using
> the elements desc or metadata. If the user agent provides
> the content of  title, desc, metadata (for example with a role
> attribute or RDFa attribute like property to indicate the
> functionality of the information), the user can get informed.
> The title element indeed is a bat choice for such information,
> because it has another functionality of a title as a short
> representation in an alternative text view - this should not
> contain information about how to use something in general,
> it contains information about what something is or
> represents.

I think the issue here is how to specify some (very) short description of what action a particular accesskey triggers.

An example where you might want different labels:
<animate begin="0s;accessKey(s);label(View intro)" end="accessKey(.);label(Skip intro)"/>

<!-- This might start a spinner animation for example -->
<animate begin="accessKey(s);label(Search)"/>

A longer description can already be given using <desc> or indeed <metadata>. A short description in <title> could be used, but there's no mapping between that and a particular attribute/action. Likewise with 'xlink:title' and 'aria-label'.

The problem with the label() syntax is that it causes the whole begin/end attribute to be treated as 'indefinite' (in user agents that don't support the new label syntax), which means it breaks backwards compatibility.

An alternative could for example be to have multiple <title> elements as children, and adding some attribute to associate a given <title> with a particular attribute. It seems that WAI-ARIA has no suitable attribute for this purpose, as it only deals with describing elements, not attributes.

Related concepts in WAI-ARIA:
aria-label         http://www.w3.org/TR/wai-aria/#aria-label
aria-labelledby    http://www.w3.org/TR/wai-aria/#aria-labelledby
aria-describedby   http://www.w3.org/TR/wai-aria/#aria-describedby

Since accessKeys in SVG can be used together with the <begin-value-list> and <end-value-list> syntax there could be scenarios where a single label per attribute isn't enough. However, those cases should be rare enough, and could probably be worked around by using multiple animation elements. The advantage of having a label directly associated with the accessKey in the begin-value-list syntax does have the drawback of breaking backwards compat, as noted above.

No UA that I tested displayed <title> elements that were children of a declarative animation element as tooltips, which means that it's less likely that problems would arise with a solution like introducing a new ARIA attribute, e.g 'aria-attribute' or 'aria-labelforattribute', to get something like this:

<animate begin="0s;accessKey(s)" end="accessKey(.)">
   <title>This element controls the intro animation</title>
   <title role="label" aria-attribute="begin">View intro</title>
   <title role="label" aria-attribute="end">Skip intro</title>
</animate>

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 22 June 2009 08:29:54 UTC