Last modified: 2014-11-04 22:53:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2658, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 658 - Table of contents shouldn't be a <table>
Table of contents shouldn't be a <table>
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.22.0
All All
: Normal enhancement with 5 votes (vote)
: 1.22.0 release
Assigned To: Bartosz Dziewoński
:
: 3949 10592 13766 (view as bug list)
Depends on:
Blocks: 367 semantic-html
  Show dependency treegraph
 
Reported: 2004-10-07 14:50 UTC by Tom Gilder
Modified: 2014-11-04 22:53 UTC (History)
10 users (show)

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


Attachments
TOC HTML fixes patch v1 (10.88 KB, patch)
2004-10-07 20:34 UTC, Tom Gilder
Details

Description Tom Gilder 2004-10-07 14:50:49 UTC
Should be a real list and shouldn't be a <table>.

I'm working on a patch.
Comment 1 Tom Gilder 2004-10-07 20:34:29 UTC
Created attachment 76 [details]
TOC HTML fixes patch v1

This needs review to check it doesn't break anything.

Makes the TOC output with decent HTML, with a proper list and no tables. Also
allows skins to style the heading number and heading text differently. CSS is a
little weird, but I think I've covered all the skins I need to.
Comment 2 Michael Zajac 2004-10-08 16:42:29 UTC
(In reply to comment #1)
> Created an attachment (id=76) [edit]
> TOC HTML fixes patch v1

Can you post a link or HTML file with a TOC showing all of the features?  We could use that to check rendering of the output HTML and CSS in 
different web browsers.
Comment 3 Tom Gilder 2004-10-10 18:24:37 UTC
Comment on attachment 76 [details]
TOC HTML fixes patch v1

Found a bug with this, a weird selection of headings and IE. Will fix and post
a test page too.
Comment 4 Tom Gilder 2005-01-15 23:24:14 UTC
Patch commited to CVS - complete TOC recode: proper HTML list; CSS for layout; JS recode; hidden TOC stays hidden 
across different pages; never show TOC if no headings; more opportunity to style TOC
Comment 5 lɛʁi לערי ריינהארט 2005-06-16 14:55:12 UTC
Hi! is bug 2405 "in an RTL wiki TOC seems to be generated always RTL" fixed also?

Regards Reinhardt
Comment 6 Ævar Arnfjörð Bjarmason 2005-11-13 08:44:20 UTC
*** Bug 3949 has been marked as a duplicate of this bug. ***
Comment 7 Ævar Arnfjörð Bjarmason 2005-11-13 08:46:06 UTC
The fix was reverted, the TOC is still a table, REOPENING
Comment 8 Brion Vibber 2005-12-15 21:26:24 UTC
Is this bug asking to change the TOC *to* a table, or 
*from* a table?
Comment 9 Rob Church 2005-12-15 22:03:02 UTC
Apparently, *to* a table.
Comment 10 Brion Vibber 2005-12-15 22:11:14 UTC
Right now it seems to be a <ul> list inside a <div> inside a <table>

Jeebus. :P

Making it fully a table would be dumb IMHO, as it's really an outline rather than a grid-like 
table. Removing the outer <table> wrapper would be semantically correct, but as I recall there 
were problems with getting a <div> to behave correctly in terms of width, wrapping, etc.
Comment 11 Théo 2005-12-16 17:02:25 UTC
The CSS attribut of display is good for that :
div.toc { display: table; }
It's exactly the same display with <table> tag, but it's some good xhtml ...
Comment 12 Tom Gilder 2005-12-17 01:16:15 UTC
?!

Erm... the TOC shouldn't have any <table> elements anywhere. 

It's a list, and should be a list, and nothing else.
Comment 13 Rob Church 2005-12-17 01:55:04 UTC
Well this bug's history's confusing as hell isn't it. Yes, seems that somewhere
along the line I, in particular, got confused as to what was being
asked...apologies to those affected. ;-)
Comment 14 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-31 02:16:49 UTC
Googling "CSS shrink width to content" indicates that the only way to have
content shrink to fit in a non-table block element is floating.  That seems
pretty ridiculous, and you'd have to clear the first section (which would
interfere with floated images, for instance).  You could use display: table;,
but IE doesn't support that.  There are other possibilities, but all are either
just as hacky as <table>s or not yet fully supported.  The table will have to
stay until CSS is improved — closing as LATER.
Comment 15 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-04 19:04:02 UTC
Sigh . . . why am I so arrogant as to close bugs on the assumption I know all about CSS there is to know?  A float could work fine, maybe wrapped in something with overflow: hidden to make a new block formatting context so it hopefully doesn't interfere with other floats.  I await working demonstrations if anyone wants to provide them, although this will break existing scripts and styles and so I'm not going to commit immediately.
Comment 16 Brion Vibber 2007-07-05 18:14:08 UTC
Floats? Ewwwwwwwwwwwwwwwwwwww.
Comment 17 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-15 07:41:21 UTC
*** Bug 10592 has been marked as a duplicate of this bug. ***
Comment 18 Brion Vibber 2011-11-29 20:25:23 UTC
Looks like the TOC is still a <ul> inside a <table> (with the <table> used just to get a fitted box).

I feel like modern things like margin: auto should make this unnecessary now but I'm not sure. Would be nice to kill the table, but only if there's a sane alternative that's reasonably compatible to IE 6.
Comment 19 Andre Klapper 2012-12-20 13:48:27 UTC
(In reply to comment #18)
> Looks like the TOC is still a <ul> inside a <table>

Still in 1.21wmf6.

[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]
Comment 20 Bartosz Dziewoński 2012-12-21 19:34:27 UTC
I submitted change I4ecd0659 that attempts to fix the issue.
Comment 21 Bartosz Dziewoński 2013-03-09 10:19:04 UTC
*** Bug 13766 has been marked as a duplicate of this bug. ***
Comment 22 Gerrit Notification Bot 2013-07-01 23:15:14 UTC
Change 39792 merged by jenkins-bot:
skin: Convert table of contents from <table> to <div>

https://gerrit.wikimedia.org/r/39792
Comment 23 Derk-Jan Hartman 2013-08-19 22:28:24 UTC
"but this isn't an issue here as the ToC is always sandwiched between other block-level elements."

Unless the ToC is preceded by a table... which is an inline-table.
Like here for instance: https://en.wikipedia.org/wiki/Category:List-Class_SCUBA_articles

Not sure what to do about this.
Comment 24 Gerrit Notification Bot 2013-09-09 19:43:23 UTC
Change 80435 had a related patch set uploaded by Bartosz Dziewoński:
ToC: Use display:table, so that we can behave like a block element

https://gerrit.wikimedia.org/r/80435
Comment 25 Gerrit Notification Bot 2013-09-09 19:48:26 UTC
Change 80435 merged by jenkins-bot:
ToC: Use display:table, so that we can behave like a block element

https://gerrit.wikimedia.org/r/80435

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


Navigation
Links