The code <span class="mw-collapsible" id="mw-customcollapsible-x,body">a</span>, when placed on a wiki page, causes the body element to undergo several changes: It has the mw-customtoggle class and tabindex=0 applied to it, along with several event handlers being attached which collapse or expand a particular element (many of these handlers suppressing normal behaviour). The "body" can be replaced with any CSS selector, including, for example "*", which will then have the effects apply to all elements matching the selector.
The source of this is presumably https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/jquery/jquery.makeCollapsible.js$246
(I don't think this bug matters much on its own, but I'm a bit concerned about what bugs this could be combined with to open up some worrisome possibilities. Sorry if this isn't the kind of thing that should be labelled a security issue, I'm not sure what the boundaries are.)