Table summary should render HTML5
OpenPublic

Description

Current table syntax allows the generation of a summary:

{| summary="This is a summary"

Which renders:

<table summary="This is a summary">

This is no longer valid in HTML5.

Propose that this should render within the caption using HTML5 tags:

<caption>

<details>
 <summary>This is a summary</summary>
</details>

</caption>


Version: 1.21.x
Severity: normal

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz41917.
Gadget850 created this task.Via LegacyNov 9 2012, 12:22 PM
He7d3r added a comment.Via ConduitOct 6 2013, 4:27 PM

Given that $wgCleanupPresentationalAttributes was removed from MW (bug 40632), do we still want this kind of transformation being made by its parser?

Gadget850 added a comment.Via ConduitOct 6 2013, 5:10 PM

This isn't like <tt>, which is whitelisted HTML markup but obsolete. This is wikimarkup which is now rendering obsolete HTML. The current code just needs to be updated.

Gadget850 added a comment.Via ConduitOct 6 2013, 5:11 PM

This isn't like <tt>, which is whitelisted HTML markup but obsolete. This is wikimarkup which is now rendering obsolete HTML. The current code just needs to be updated.

If I see <tt> in content, I can easily fix it. There is no way an editor can fit table summary.

matmarex added a comment.Via ConduitOct 6 2013, 5:15 PM

Wikitext tables support captions.

{|

+ Caption

! Heading A
! Heading B

-
}
Gadget850 added a comment.Via ConduitOct 7 2013, 12:39 PM

(In reply to comment #4)

Wikitext tables support captions.

{|
|+ Caption
! Heading A
! Heading B
|-
| …
|}

Yes, they do. But this relates to the table summary, not the caption. HTML5 uses different markup for summary.

And yes, summary is used on the English Wikipedia.

Gadget850 added a comment.Via ConduitNov 2 2014, 2:27 AM
This comment was removed by Gadget850.
Redrose64 added a subscriber: Redrose64.Via WebMar 6 2015, 5:23 PM

The <summary>..</summary> element, which was part of the proposed HTML5 W3C Candidate Recommendation as recently as 4 February 2014, is not part of the W3C Recommendation that was issued on 28 October 2014. The summary= attribute of the <table> tag is in the latter specification, but marked obsolete.

Jdforrester-WMF removed a project: Newparser.Via WebThu, Jun 4, 9:39 PM

Add Comment