This is the same sort of problem as bug 67153 in the Save dialog.  


Here is the incomplete tab order in Safari 6:

1.  Insert > Template

2.  The cursor starts in the template name field.  (It doesn't matter if you type something now.)  Tab:

a) "Add template" button
b)  Nothing—cursor disappears
c) "Apply changes" button 
d) "Show options" (visually backwards, but maybe that's okay)
e)  Escape the template dialog into the mess described in the Safari-specific bug 67156.

Not accessible:  The X-to-cancel button at the top of the dialog.



Here is the even more incomplete tab order in Firefox 30:

1.  Insert > Template

2.  The cursor starts in the template name field.  (It doesn't matter if you type something now.)  Tab:

a) the browser's URL bar
b) the browser's search box (for search engines)
c) who knows?  It disappears.
d) the main Wikipedia search box 
e) the top of the article
f) the MediaWiki "More" menu (where "Move" hides)
g) the icon/go button for the main Wikipedia search box
h) the languages (gear icon) button
i) the New template dialog (as a whole, not any useful piece of it)
j) who knows?  It disappears again.
k) the New template dialog (as a whole, not any useful piece of it)
l) who knows?  It disappears again.
m) back to the field for the template name, repeating endlessly.

Where it doesn't go is:

n) the Add template button
o) the Show options button
p) to the X at the top of the dialog box, so you can cancel adding a template and go back to editing. 


IMO the order in all cases ought to be:

a)  Start in the template name field
b) "Add template" button
c) "Apply changes" button 
d) "Show options"
e)  X to cancel the dialog and go back to editing

and nothing else (repeat endlessly, if the person keeps pressing tab).

I'm willing to have C and D reversed, because it would be visually more obvious (for left-to-right languages).  However, most users won't be clicking that button, so it'd be more efficient to have it later in the tab order.

--------------------------
**Version**: unspecified
**Severity**: minor
**See Also**:
https://bugzilla.wikimedia.org/show_bug.cgi?id=67153