When users click on the link "Move to Commons" on a file's wikipedia file page, they should proceed with the actual move in a new tab. This should help them not to lose context of where they come from - since the original page is still open.
|Open||None||T140462 Correctly move files from Wikipedia to Commons (2013)|
|Open||None||T144480 Move files from Wikipedia to Commons|
|Resolved||Addshore||T160676 Open a new tab when users click on "Move to Commons"|
So it looks like target is not supported by the code that eventually handles the list of links that we modify in the hook https://www.mediawiki.org/wiki/Manual:Hooks/SkinTemplateNavigation
The links appear to be build on a skin by skin basis so this would probably mean touching every skin to allow them to handle a target here.
I'm going to poke someone to get a second opinion.
I think the real bug here is that Vector is not using $this->makeListItem() to render this menu and instead is generating HTML by hand. I think that should support custom attributes already. (And if it doesn't, you theoretically only need to fix it in one place rather than in every skin.)
Oooh, that is nice. Thanks for looking into this!
In which case the patch that is up is the only one that we probably need (covering the main WMF usecase).
We could work on making Vector use makeListItem, or leave that to someone that knows more about the skin system.
Interesting. From looking at Vector, the arbitrary attributes go to the list item. But looking at BaseTemplate, they go to the anchor link. This might complicate migration to $this->makeListItem() – but, this may just be an internal name match. I'd say it's worth trying.