Page MenuHomePhabricator

Add an id to the title of the page (firstHeading)
Closed, ResolvedPublic

Description

Is it possible to add a CSS id to the title of the page (the first h1 heading).

It has already the class "firstHeading" in the Monobook skin, but an id would be useful for scripts which presently use something like document.getElementsByTagName("h1")[0].

This change must be done in the Monobook skin; and it would be better to review the Modern skin because there is an id "firstHeading" but no class (contrary to Monobook). I don't know if the other skins should be modified.


Version: 1.14.x
Severity: minor

Details

Reference
bz15427

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:16 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz15427.
bzimport added a subscriber: Unknown Object (MLST).

happy_melon wrote:

Surely the more logical approach would be to apply firstHeading as an id in Monobook (as in Modern) and apply the CSS styles to it as an id rather than as a class.