WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Tabindexing question


From: Jared Smith
Date: Jan 20, 2012 11:57AM

On Fri, Jan 20, 2012 at 11:42 AM, Nancy Johnson wrote:

> I set the tabindex ="1" to  the first control.

tabindex with positive values is almost universally a bad idea. I very
rarely find cases where this doesn't make accessibility worse.

> If I set the tabindex to the first control, the focus immediately goes
> there and skips the navigation.
> Is there a remedy?

If the navigation is before the controls, then you don't need to do
anything. It will naturally be present in the navigation order before
the controls.

If you want the user to start at a place other than the top of the
page, you should consider that this may be confusing to users because
it will be different than other pages on the site. But if you require
this, you can either restructure the underlying HTML code and use CSS
to present the stuff you want first at the beginning of the markup
(this could be confusing to sighted users who may be confused by the
odd keyboard navigation order), or you could use JavaScript focus() to
set focus to the element you want when the page loads.

Jared Smith