Last modified: 2011-03-13 18:06:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10588 - specific id or class for the first <p> of an article
specific id or class for the first <p> of an article
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-07-15 06:31 UTC by italvet
Modified: 2011-03-13 18:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description italvet 2007-07-15 06:31:19 UTC
Like <h1 class="firstHeading">, a <p class="firstParagraph"> should be really useful for javascript catchers. When there are diambiguations links or pictures between the first heading and the first paragraph, the javascript for catch the first paragraph becomes very tricky, and a simple class or id could make it more simple.

Furthermore, because the first paragraph have a special status in a wikipedia page (bounds the #toc, defines the subject, includes the infobox, etc.) a DOM identifer could help in many other cases.
Comment 1 italvet 2007-07-15 06:35:23 UTC
i set the priority high beause this problem stops me in a javascript i'm coding. I don't know exactly how priority grading system works, so feel free to change it.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-15 07:50:25 UTC
The first <p> is exactly that, the first <p>.  JavaScript can trivially be written to retrieve it, for instance (not tested but you get the idea):

element = document.getElementById( 'bodyContent' ).firstChild;
while( true ) {
	if( element.nodeType == 1 && element.nodeName == 'p' ) break;
	else element = element.nextSibling();

This looks like an extremely narrow request that would be of use to very few.

Note You need to log in before you can comment on or make changes to this bug.