Skip to content

Commit 0da2ce0

Browse files
committed
update to class
1 parent 4cdf05f commit 0da2ce0

File tree

4 files changed

+16
-34
lines changed

4 files changed

+16
-34
lines changed

doc/main.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ <h4>Prose section(s)</h4>
657657
<p>The <code>class</code> attribute of a <a>Prose section</a> shall not contain the <code>annex</code> class.</p>
658658

659659
<p>
660-
To label any <a>Prose section</a> or child of a <a>Prose section</a> as <code>(Informative)</code>, the attribute <code>data-informative="true"</code> shall be present. It is assumed that once any <a>Prose section</a> is labeled as <code>(Informative)</code> all subsequent child(ren) of the <a>Prose section</a> are informative, and do not require the label, and therefore shall not contain the attribute <code>data-informative="true"</code>.
660+
To label any <a>Prose section</a> or child of a <a>Prose section</a> as <code>(Informative)</code>, the <code>class</code> attribute value of <code>informative</code> shall be present. It is assumed that once any <a>Prose section</a> is labeled as <code>(Informative)</code> all subsequent child(ren) of the <a>Prose section</a> are informative, and do not require the label, and therefore shall not contain the <code>class</code> attribute value of <code>informative</code>.
661661
</p>
662662

663663
<p>A section heading element of the appropriate level shall be present, starting with level 2 (<code>h2</code>) for all
@@ -680,7 +680,7 @@ <h4>Prose section(s)</h4>
680680
&lt;p&gt;Some technical content&lt;/p&gt;
681681
&lt;/section&gt;
682682
&lt;/section&gt;
683-
&lt;section id=&quot;sec-info-prose-sub-clause&quot; data-informative=&quot;true&quot;&gt;
683+
&lt;section id=&quot;sec-info-prose-sub-clause&quot; class=&quot;informative&quot;&gt;
684684
&lt;h3&gt;Informative Prose Sub Clause&lt;/h3&gt;
685685
&lt;p&gt;Some informative content&lt;/p&gt;
686686
&lt;/section&gt;
@@ -701,11 +701,11 @@ <h4>Annex section(s)</h4>
701701
<p>An <a>Annex section</a> shall not contain nested <a>annex sections</a>.</p>
702702

703703
<p>
704-
To label any <a>Annex section</a> or child of a <a>Annex section</a> as <code>(Informative)</code>, the attribute <code>data-informative="true"</code> shall be present. It is assumed that once any <a>Annex section</a> is labeled as <code>(Informative)</code> all subsequent child(ren) of the <a>Annex section</a> are informative, and do not require the label, and therefore shall not contain the attribute <code>data-informative="true"</code>.
704+
To label any <a>Annex section</a> or child of a <a>Annex section</a> as <code>(Informative)</code>, the <code>class</code> attribute value of <code>informative</code> shall be present. It is assumed that once any <a>Annex section</a> is labeled as <code>(Informative)</code> all subsequent child(ren) of the <a>Annex section</a> are informative, and do not require the label, and therefore shall not contain the <code>class</code> attribute value of <code>informative</code>.
705705
</p>
706706

707707
<div class="example">
708-
<pre>&lt;section class=&quot;annex&quot; id=&quot;sec-addtional-info&quot; data-informative=&quot;true&quot;&gt;
708+
<pre>&lt;section class=&quot;annex informative&quot; id=&quot;sec-addtional-info&quot;&gt;
709709
&lt;h2&gt;Additional Info&lt;/h2&gt;
710710
&lt;section id=&quot;sec-additional-info-sub-section&quot;&gt;
711711
&lt;h3&gt;Additional Info Sub Section&lt;/h3&gt;
@@ -1490,7 +1490,7 @@ <h3>Git commit hooks</h3>
14901490

14911491
</section>
14921492

1493-
<section class="annex" id="sec-table-examples" data-informative="true">
1493+
<section class="annex informative" id="sec-table-examples">
14941494
<h2>Table Examples</h2>
14951495
<section id="sec-table-alignment">
14961496
<h3>Alignment</h3>
@@ -1834,7 +1834,7 @@ <h3>Complex Example</h3>
18341834

18351835
</section>
18361836

1837-
<section class="annex" id="sec-list-examples" data-informative="true">
1837+
<section class="annex informative" id="sec-list-examples">
18381838
<h2>List Examples</h2>
18391839
<section id="sec-ordered-lists">
18401840
<h3>Customizing Ordered Lists</h3>

smpte.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ function numberSections(element, curHeadingNumber) {
918918
}
919919

920920
heading.insertBefore(headingLabel, heading.firstChild);
921-
if (child.dataset.informative === "true") {
921+
if (child.classList.contains("informative")) {
922922
heading.appendChild(document.createTextNode(" (Informative)"))
923923
}
924924
numberSections(child, numText);

test/resources/html/validation/informative-invalid.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

test/resources/html/validation/informative-valid.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
<!doctype html>
22
<html>
3-
<head itemscope="itemscope" itemtype="http://smpte.org/standards/documents">
3+
<head itemscope="itemscope" itemtype="http://smpte.org/standards/documents">
44
<meta charset="utf-8" />
55
<meta http-equiv="x-ua-compatible" content="ie=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<script type="module" src="../../../smpte.js"></script>
78
<meta itemprop="test" content="valid" />
8-
<meta itemprop="pubType" content="AG" />
9-
<meta itemprop="pubNumber" content="99" />
9+
<meta itemprop="pubType" content="ST" />
10+
<meta itemprop="pubNumber" content="26" />
1011
<meta itemprop="pubState" content="draft" />
12+
<meta itemprop="pubStage" content="WD" />
13+
<meta itemprop="pubTC" content="XX" />
14+
<meta itemprop="pubConfidential" content="yes" />
15+
<meta itemprop="pubDateTime" content="2025-02-26" />
1116
<title>Title of the document</title>
1217
</head>
1318
<body>
1419
<section id="sec-scope">
1520
<p>This is the scope of the document.</p>
1621
</section>
17-
<section id="sec-informative" data-informative="true">
22+
<section id="sec-informative" class="informative">
1823
<h2>Second Section</h2>
1924

2025
<p>This is the informative section.</p>

0 commit comments

Comments
 (0)