diff --git a/src/w3c/templates/headers.js b/src/w3c/templates/headers.js index 53a4ed271b..1ca09ba76d 100644 --- a/src/w3c/templates/headers.js +++ b/src/w3c/templates/headers.js @@ -156,90 +156,93 @@ export default (conf, options) => { ${conf.logos.map(showLogo)} ${document.querySelector("h1#title")} ${getSpecSubTitleElem(conf)}

${renderSpecTitle(conf)}

-
- ${conf.isTagFinding || !conf.isNoTrack - ? html` -
${l10n.this_version}
-
- ${conf.thisVersion} -
-
${l10n.latest_published_version}
-
- ${conf.latestVersion - ? html`${conf.latestVersion}` - : "none"} -
- ` - : ""} - ${conf.edDraftURI - ? html` -
${l10n.latest_editors_draft}
-
${conf.edDraftURI}
- ` - : ""} - ${conf.testSuiteURI - ? html` -
${l10n.test_suite}
-
${conf.testSuiteURI}
- ` - : ""} - ${conf.implementationReportURI - ? html` -
${l10n.implementation_report}
-
- ${conf.implementationReportURI} -
- ` - : ""} - ${conf.isED && conf.prevED - ? html` -
${l10n.prev_editor_draft}
-
${conf.prevED}
- ` - : ""} - ${conf.showPreviousVersion - ? html` -
${l10n.prev_version}
-
${conf.prevVersion}
- ` - : ""} - ${!conf.prevRecURI - ? "" - : conf.isRec - ? html` -
${l10n.prev_recommendation}
-
${conf.prevRecURI}
- ` - : html` -
${l10n.latest_recommendation}
-
${conf.prevRecURI}
- `} -
${conf.multipleEditors ? l10n.editors : l10n.editor}
- ${showPeople(conf, "editors")} - ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0 - ? html` -
- ${conf.multipleFormerEditors - ? l10n.former_editors - : l10n.former_editor} -
- ${showPeople(conf, "formerEditors")} - ` - : ""} - ${conf.authors - ? html` -
${conf.multipleAuthors ? l10n.authors : l10n.author}
- ${showPeople(conf, "authors")} - ` - : ""} - ${conf.otherLinks ? conf.otherLinks.map(showLink) : ""} -
+
+ ${l10n.more_details_about_this_doc} +
+ ${conf.isTagFinding || !conf.isNoTrack + ? html` +
${l10n.this_version}
+
+ ${conf.thisVersion} +
+
${l10n.latest_published_version}
+
+ ${conf.latestVersion + ? html`${conf.latestVersion}` + : "none"} +
+ ` + : ""} + ${conf.edDraftURI + ? html` +
${l10n.latest_editors_draft}
+
${conf.edDraftURI}
+ ` + : ""} + ${conf.testSuiteURI + ? html` +
${l10n.test_suite}
+
${conf.testSuiteURI}
+ ` + : ""} + ${conf.implementationReportURI + ? html` +
${l10n.implementation_report}
+
+ ${conf.implementationReportURI} +
+ ` + : ""} + ${conf.isED && conf.prevED + ? html` +
${l10n.prev_editor_draft}
+
${conf.prevED}
+ ` + : ""} + ${conf.showPreviousVersion + ? html` +
${l10n.prev_version}
+
${conf.prevVersion}
+ ` + : ""} + ${!conf.prevRecURI + ? "" + : conf.isRec + ? html` +
${l10n.prev_recommendation}
+
${conf.prevRecURI}
+ ` + : html` +
${l10n.latest_recommendation}
+
${conf.prevRecURI}
+ `} +
${conf.multipleEditors ? l10n.editors : l10n.editor}
+ ${showPeople(conf, "editors")} + ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0 + ? html` +
+ ${conf.multipleFormerEditors + ? l10n.former_editors + : l10n.former_editor} +
+ ${showPeople(conf, "formerEditors")} + ` + : ""} + ${conf.authors + ? html` +
${conf.multipleAuthors ? l10n.authors : l10n.author}
+ ${showPeople(conf, "authors")} + ` + : ""} + ${conf.otherLinks ? conf.otherLinks.map(showLink) : ""} +
+
${conf.errata ? html`

Please check the diff --git a/tests/spec/w3c/headers-spec.js b/tests/spec/w3c/headers-spec.js index 45b885e0a1..76bcb00897 100644 --- a/tests/spec/w3c/headers-spec.js +++ b/tests/spec/w3c/headers-spec.js @@ -25,6 +25,19 @@ describe("W3C — Headers", () => { collapsedTextContent(child).includes(string) ); } + + it("has a details and summary", async () => { + const opts = makeStandardOps({ specStatus: "FPWD" }); + const doc = await makeRSDoc(opts); + const details = doc.querySelector(".head details"); + const summary = doc.querySelector(".head summary"); + const dl = doc.querySelector(".head details > dl"); + expect(details).toBeTruthy(); + expect(details.open).toBe(true); + expect(summary).toBeTruthy(); + expect(dl).toBeTruthy(); + }); + it("links to the 'kinds of documents' only for W3C documents", async () => { const statuses = ["FPWD", "LCWD", "WD", "CR", "CRD", "PR", "REC", "NOTE"]; for (const specStatus of statuses) {