WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Setting focus in a php form


From: Jon May
Date: Sep 13, 2006 3:50PM

Hi Erika,

Is there any you can send the number of the tabindex your form is up to
to the script that generates the new section of the form? This way you
assign the next tabinex+1 and set focus there.

Using an AJAX style setup might be a solution too, but that would not be
very accessible.

If you would like me to have a look at the script let me know via my
email in my signature.

Jon May
Mayhem Design

Erika Noll Webb wrote:

>We're working on a project where we have a php form that displays new fields
>after it makes a call to the database to determine what options will be
>available based on user decisions previously in the form. I'm trying to
>figure out a good way to reset the focus to the next section of the form
>after each action. Does anybody know a good way to do this? Right now, the
>page scrolls, but it's not really resetting the focus (although visually it
>might seem like it does). It's a hack, and I'd like a cleaner and more
>accessible solution.
>Erika Noll Webb, Ph.D.
>Partner, Quintus Design
>5370 Manhattan Circle Suite 105
>Boulder CO 80303
>o) 303.449.5020
>m) 720.319.2145
>f) 303.449.7045
>IM erikanollwebb