Change to section edit links

The default position of the "edit" link in page section headers changed in MediaWiki 1.22. The "edit" link is now positioned adjacent to the page header text rather than floating opposite it.

This page exists to disseminate information about the change, to provide editors who don't like it with a way of restoring the old appearance, and to provide guidance to developers (gadget authors, et al.) about updating code to be compatible with the new output.

Section edit links will be to the immediate right of section titles, instead of on the far right. If you're an editor of German, French, Italian, Polish, Japanese, or one of the other Wikipedias which already implemented this change, nothing will substantially change for you. Scripts, gadgets, screen scrapers, or other software that depends on the previous implementation of section edit links will have to be adjusted to continue working; however, nothing else should break even if they are not updated in time.

the section edit link now has class="mw-editsection" instead of class="editsection"; and

the section edit link is now placed after the actual headline content (<spanclass="mw-headline">...</span>) instead of before it.

The editsection class will for now continue to work as before, but will be removed in the future.

If you were hooking into the section edit link, or adding something to it (like some QuickEdit scripts does, or some RfD handling ones do), most likely you will only need to change editsection to mw-editsection in your code. Please note, however, that for a period of time, due to parser caching, your code might encounter pages with either of these variants and should handle both of them.

Related ideas for improving the structure and placement of section edit links date back years, all the way to 2009 at least. It is often difficult for new and experienced editors to track which of several potential section edit links on the far right is associated with the correct section. Many readers and anonymous or new editors may even be failing to notice section edit links at all, since they read section titles, which are far away from the links.

In 2009, the Wikipedia Usability Initiativeproposed an approach where section edit links would be "moved next to the title" and icon would be added. Years later this was tested on a subset of all anonymous or registered editors to English Wikipedia, with promising results: the number of clicks on section edit links increased by 116%! (It looked like this.) Making this change was slightly more difficult than testing it however, and the associated code sat unactivated.

Now that old code like this is being cleaned up, a simpler form of this change was commited into MediaWiki, which just moves the current style of section edit links to be near the title. It is intended as less disruptive and more fitting with the current interface than the original mockup.

If you don't like the change, you can move the edit links to float opposite the page header by adding a short snippet of CSS to your user stylesheet (Special:MyPage/common.css on the relevant wiki) or the site-wide stylesheet (MediaWiki:Common.css on the relevant wiki):