I have a dialog with a form that is split across tabs in an accordion (see [this jsfiddle](http://jsfiddle.net/E9TeB/)  as an example). Right now, when the user is in the First Name field and hits the tab key to move on to the next field, it moves focus to the Okay button; what I would like to happen is that Tab 2 opens and focuses Address Line 1. Is there an elegant way to do this, or will I have to write my own keypress handlers?

Thanks!

HTML code from the fiddle:

```
<div id=dialog title="My dialog">
    <form>
    <div id=accordion>
        <h3>Tab 1</h3>
        <div><table>
            <tr><td><label for=last-edit>Last Name:</label></td><td><input id=last-edit /></td></tr>
            <tr><td><label for=first-edit>First Name:</label></td><td><input id=first-edit /></td></tr>
        </table></div>      
        <h3>Tab 2</h3>
        <div><table>
            <tr><td><label for=add1-edit>Address 1:</label></td><td><input id=add1-edit /></td></tr>
            <tr><td><label for=add2-edit>Address 2:</label></td><td><input id=add2-edit /></td></tr>
        </table></div>      
    </div>
    </form>
</div>

```

Javascript from the fiddle:

```
$("#dialog").dialog({
    width: 500,
    autoOpen : true,
    buttons: {
        "Ok" : function() {
            $(this).dialog("close");
        },
        "Cancel" : function() {
            $(this).dialog("close");
        }
    },
});
$('#accordion').accordion({
    heightStyle: "content"
});

```