Most modern web browsers now close tabs when the middle mouse button is clicked on them, is this an expected behavior for other applications where tabs cans can be opened, closed and changed whilst using it? Especially with users who won't be expected to have a great technical knowledge.
I also had no idea this was an option until trying it just now! But now that I know, I won't forget.
I believe this is an example of progressive disclosure, or at least introducing progressive complexity in the available interactions. It is a shortcut feature for expert users (or at least those knowledgeable about this particular interaction), but does not detract in any way from the more visible/affordable interactions ("X" button, for example).
So to echo some of the other answers/comments: Yes, I think it is a good idea. Whether it is a common enough pattern (yet) for it to be expected behavior - perhaps not but that doesn't mean it shouldn't be there. As long as it's not overriding or coming into conflict with any other expected interaction pattern, it's a valid shortcut.
Disclaimer: I had no idea you could do that!
I always use Ctrl+W to close tabs, but for users less familiar with keyboard shortcuts, it makes sense. The button to close tabs tends to be tiny so middle clicking anywhere on the tab enlarges the target for free.
Obviously, discoverability is quite poor though, but then again you could say the same thing about many keyboard shortcuts.
Whether it's expected behaviour is debatable, but it's a new shortcut so if most modern browsers do it then it will eventually become expected.
I actually disagree that it's expected behavior. Because in Windows, middle clicking a program on the taskbar duplicates it. I don't know about Mac and Linux, but I'd expect similar behavior. Matter of fact, I actually discovered that feature by accident: I middle clicked a tab expecting it to be duplicated, and instead it closed!
However, since all major web browsers do this it is probably the accepted convention at this point, as the other answers state.
Well, my answer here would be NO. When you click a link with the middle button it opens the link in a new tab, hence, "creates" a new tab. I relate "creation" with a positive, additive function, and by using the middle button to close a window we are using the middle button to "destroy" (ok ok, just close) tabs, it feels just contradicting. Besides, there's an X button right there, and there's a right-click + 'close tab' option - why do we need another one?
I find it very annoying. I use a laptop with a touchpad containing a "middle mouse key", and it is extraordinarily easy to try to focus a page using the left button but then click the middle button by mistake and lose the page altogether.
I've turned the middle button off on my touchpad (I rarely ever use it), but it feels like a use case that wasn't really thought through.
I haven't heard the same complaint from anyone else, but Opera, that has implemented it, is still something of a niche browser. I'll be interested to see if and when other people get burned by this one.
This is totally browser based rather than application based. But user can configure middle click on his mouse to do some other action.
As per image, it seems that it is totally user's choice to configure middle click action. And all browsers, Safari, Chrome, IE supports middle click which by default closes the tab or application.
I know this feature for last 5 years and I found it very handy. Any user having experience with this would like to have this feature in each and every browser. Now, it is totally on developer to have this feature in their desktop application. But, if someone provides it, then I am sure that they will be quite happy.