WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Partial Tabindex Behavior

for

From: Jukka K. Korpela
Date: Jul 18, 2014 12:20PM


2014-07-18 20:46, James Bailey wrote:

> I evaluated a page and the code contained focusable elements, some
> with Tabindex set to values > 0 and some without. It seems that
> elements with a Tabindex are ordered before elements with no
> Tabindex. Is that correct?

That's what happens in practice. The specs are somewhat obscure. HTML
4.01 does not explicitly say this:
http://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex
But it might be read so that when the tabindex attribute is not present,
it is defaulted to 0 (though this is not stated explicitly in the spec),
and thus such elements fall into category 2 (elements that do not
support tabindex or have it set to 0), which is navigated, in textual
order, after elements with a positive tabindex.

HTML5 is obscure in this issue, too:
http://www.w3.org/TR/html5/editing.html#focus-management

It can be argued that it is safer to assign tabindex to all focusable
elements if it is used at all. But this would just avoid the theoretical
ambiguity, so it's not important in practice.

Yucca