I work on a web application that allows users to create tabs and fill them with modules that display analytic data. So one tab may have a series of bar graphs, and another may have a group of tables. Or one may have data pertaining to one aspect of our business, and another tab would detail another aspect.
The tab UI is similar to Google Chrome: to open a new tab you click on a "+" button to the right of all the other tabs. New tabs are appended to the right of the last tab added.
I'm wondering which tab should take focus when you close a tab. I've seen this done 2 ways:
You close a tab, the tab immediately to it's right takes focus (or if there is no tab to it's right, the tab immediately to it's left takes focus).
You close a tab, the last tab you were viewing now takes focus.
I've just conducted some 'extensive research'* into this comparing how various browsers and desktop applications treat this issue and my findings are thus:
Axure - Shows tab to the right of the one closed
IE9 - Shows tab to the right of the one closed
Firefox - Shows tab to the right of the one closed
Chrome - Shows tab to the right of the one closed
Excel '10 - Shows tab to the right of the one closed
Safari (Mac) - Shows tab to the right of the one closed
Opera - Shows the last visited tab. <- Only app I can find that does this.
Therefore I'd suggest going with the majority. If major applications all work in one way then i'd stick with this to avoid confusion.
/Edit - On further thinking I believe the actual tab metaphor here is being used. If you have a load of files in a physical folder and you take one of the folders away you'd then see the folder behind this one. Replicating the tab metaphor in the web / computer world is a pretty common strategy as it presumably reduces the learn time needed to pick up the new skills.
*extensive research = testing out on the various applications I have on my laptop at the current moment in time.
From the UX point of view, the tab to focus on is the most predictable one. That is to say the obvious next one. Given the natural alignment of tabs from the left to right, when the user removes a tab, the tab on the right will take its place. That's why most browser show tab to the right of the one closed.