CoreyRS
CoreyRS

Reputation: 2267

Multiple HTML forms per page. Tabbing jumps from form to form. Why?

I have multiple html forms on a page and noticed that if the user is tabbing between form elements they can also end up tabbing between forms which I don't want to happen.

I've read the answer about forms that are not being used given here: Multiple forms on one HTML page: how to restrict tabbing to a single form?

I'm wondering if there is now a better way to keep form elements knowingly grouped together y the browser so that tabbing will loop between elements within the same form only. One would think the use of the form tag would suffice but clearly this was something that went over the head of those browser vendors we all know and love.

Edit: This is for a webapp not a desktop website.

Upvotes: 0

Views: 600

Answers (1)

spirytus
spirytus

Reputation: 10946

You probably found a solution already but hope it will help others.

I had similar problem and created tiny jQueryUI plugin that limits fields that TAB affects. you use it simply:

$(".someGroup").tabGuard();

and that will make tab iterate over fields inside of .someGroup wrapper. This way you can group various forms on a page and the one in focus will keep iterating on TAB or Shift+TAB if that makes sense. Find it here:

http://tomaszegiert.seowebsolutions.com.au/tabguard/index.htm

I hope someone will find it useful.

Upvotes: 1

Related Questions