Re: [svg2] tabindex and defaults

On Mon, Mar 31, 2014 at 10:45 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> Rik Cabanier:
> > OK, the HTML recommends that only a set of elements has behavior when
> > tabindex is missing:
> >
> http://www.w3.org/html/wg/drafts/html/master/editing.html#the-tabindex-attribute
> > .There
> > is no MUST .
>
> Could you quote the text you're referring to?  I can't find any text
> that says tabindex="" is recommended to have no effect on particular
> elements.


From
http://www.w3.org/html/wg/drafts/html/master/editing.html#the-tabindex-attribute
:

If the attribute is omitted or parsing the value returns an error

The user agent should follow platform conventions to determine if the
element's tabindex focus flag is set and, if so, whether the element and
any focusable areas that have the element as their DOM anchor can be
reached using sequential focus navigation, and if so, what their relative
position in the sequential focus navigation order is to be.


Modulo platform conventions, it is suggested that for the following
elements, the tabindex focus flag be set:

a elements that have an href attribute

link elements that have an href attribute

button elements

input elements whose type attribute are not in the Hidden state

select elements

textarea elements

menuitem elements

Elements with a draggable attribute set, if that would enable the user
agent to allow the user to begin a drag operations for those elements
without the use of a pointing device

Editing hosts

Browsing context containers

Sorting interface th elements

...
If the value is a zero

The user agent must set the element's tabindex focus flag, should allow the
element and any focusable areas that have the element as their DOM anchor
to be reached using sequential focus navigation, following platform
conventions to determine the element's relative position in the sequential
focus navigation order.


So, setting 'tabindex=""' on a <p> element has no effect, while setting
 'tabindex="0"' makes that <p> focusable.
See: http://jsfiddle.net/TGP9T/

We can do the same for SVG.
The SVG anchor element is focusable by default (ie
http://www.w3.org/TR/SVG11/images/linking/link01.svg) which matches HTML

Received on Tuesday, 1 April 2014 17:22:09 UTC