Skip to content

Commit 6cae8cf

Browse files
committed
rephrase
1 parent 78c2626 commit 6cae8cf

File tree

2 files changed

+30
-25
lines changed

2 files changed

+30
-25
lines changed

docs/index.bs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3860,9 +3860,12 @@ pointing to the test covering some nearby text.
38603860
If all or most of your tests have a common path prefix,
38613861
you can specify it in [=WPT Path Prefix=] metadata,
38623862
and then leave it off of all the individual test lines.
3863+
This also triggers Bikeshed to complain if it knows of any tests under that prefix
3864+
that don't show up in your spec.
3865+
38633866
An explicit <dfn element-attr for="wpt, wpt-rest">pathprefix</dfn> attribute
3864-
can also provide the path prefix,
3865-
and will override the metadata if specified.
3867+
can also provide the path prefix for a single <{wpt}> block,
3868+
overriding the metadata if specified.
38663869

38673870
<div class=example>
38683871
If the preceding example used [=WPT Path Prefix=],

docs/index.html

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,9 +1488,9 @@
14881488
}
14891489
}
14901490
</style>
1491-
<meta content="Bikeshed version e716a693a, updated Mon Oct 21 15:59:55 2024 -0700" name="generator">
1491+
<meta content="Bikeshed version 3686d71cf, updated Fri Oct 25 15:50:59 2024 -0700" name="generator">
14921492
<link href="https://speced.github.io/bikeshed/" rel="canonical">
1493-
<meta content="e716a693ae20f5d13bce97741ac3cabcd4970a84" name="revision">
1493+
<meta content="3686d71cf70b4e396c75979cdc74abe37801a2f6" name="revision">
14941494
<meta content="dark light" name="color-scheme">
14951495
<style>/* Boilerplate: style-autolinks */
14961496
.css.css, .property.property, .descriptor.descriptor {
@@ -5830,7 +5830,7 @@ <h2 class="heading settled" data-level="11" id="testing"><span class="secno">11.
58305830
the canonical way to test new features and ensure interoperability
58315831
is to contribute the testsuite to the <a href="https://wpt.fyi/about">Web Platform Tests</a> project.
58325832
Bikeshed has some useful tools to interact with WPT information.</p>
5833-
<h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data-level="11.1" data-lt="wpt" id="wpt-element"><span class="secno">11.1. </span><span class="content"> Annotating Specs with Tests: the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element③">wpt</a></code> element</span><a class="self-link" href="#wpt-element" id="ref-for-wpt-element②"></a></h3>
5833+
<h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data-level="11.1" data-lt="wpt" id="wpt-element"><span class="secno">11.1. </span><span class="content"> Annotating Specs with Tests: the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element③">wpt</a></code> element</span><a class="self-link" href="#wpt-element" id="ref-for-wpt-element②"></a></h3>
58345834
<p>When writing tests,
58355835
you can sometimes link to the section of the spec that you’re testing,
58365836
to make it easier to review.
@@ -5860,12 +5860,14 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data
58605860
<p>If all or most of your tests have a common path prefix,
58615861
you can specify it in <a data-link-type="dfn" href="#metadata-wpt-path-prefix" id="ref-for-metadata-wpt-path-prefix">WPT Path Prefix</a> metadata,
58625862
and then leave it off of all the individual test lines.
5863-
An explicit <dfn class="dfn-paneled" data-dfn-for="wpt, wpt-rest" data-dfn-type="element-attr" data-export id="element-attrdef-wpt-pathprefix"><code>pathprefix</code></dfn> attribute
5864-
can also provide the path prefix,
5865-
and will override the metadata if specified.</p>
5863+
This also triggers Bikeshed to complain if it knows of any tests under that prefix
5864+
that don’t show up in your spec.</p>
5865+
<p>An explicit <dfn class="dfn-paneled" data-dfn-for="wpt, wpt-rest" data-dfn-type="element-attr" data-export id="element-attrdef-wpt-pathprefix"><code>pathprefix</code></dfn> attribute
5866+
can also provide the path prefix for a single <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element⑥">wpt</a></code> block,
5867+
overriding the metadata if specified.</p>
58665868
<div class="example" id="example-123bb00c">
58675869
<a class="self-link" href="#example-123bb00c"></a> If the preceding example used <a data-link-type="dfn" href="#metadata-wpt-path-prefix" id="ref-for-metadata-wpt-path-prefix①">WPT Path Prefix</a>,
5868-
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element could be shorter:
5870+
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element could be shorter:
58695871
<pre class="highlight"><c- p>&lt;</c-><c- f>pre</c-> <c- e>class</c-><c- o>=</c-><c- s>metadata</c-><c- p>></c->
58705872
WPT Display: open
58715873
WPT Path Prefix: /foo-spec/
@@ -5891,56 +5893,56 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data
58915893
</div>
58925894
<p>For debugging purposes,
58935895
a single <dfn class="dfn-paneled" data-dfn-type="element" data-export data-lt="wpt-rest" id="elementdef-wpt-rest"><code>&lt;wpt-rest></code></dfn> element can be used in a spec,
5894-
which will act like a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element containing all the tests under the current path prefix
5895-
that aren’t already specified in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element.
5896+
which will act like a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element containing all the tests under the current path prefix
5897+
that aren’t already specified in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element.
58965898
As this defeats Bikeshed’s ability to tell you when you’re missing any tests,
58975899
Bikeshed will emit a warning as long as a <code><a data-link-type="element" href="#elementdef-wpt-rest" id="ref-for-elementdef-wpt-rest">wpt-rest</a></code> element is in use.</p>
58985900
<p>Bikeshed’s knowledge of valid tests allows some useful checks:</p>
58995901
<ul>
59005902
<li data-md>
59015903
<p>If <a data-link-type="dfn" href="#metadata-wpt-path-prefix" id="ref-for-metadata-wpt-path-prefix②">WPT Path Prefix</a> is specified,
5902-
then any tests under that prefix that aren’t specified in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element">wpt</a></code> element
5904+
then any tests under that prefix that aren’t specified in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⓪">wpt</a></code> element
59035905
will trigger a fatal error,
59045906
so you’ll be alerted when new tests are added.</p>
59055907
<li data-md>
59065908
<p>If you specify a path that doesn’t exist
59075909
(or <em>no longer</em> exists due to tests being moved or deleted),
59085910
it will trigger a fatal error.</p>
5909-
<p>This check can be disabled for a given <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element
5911+
<p>This check can be disabled for a given <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element
59105912
by giving it the <dfn class="dfn-paneled idl-code" data-dfn-for="wpt" data-dfn-type="attribute" data-export id="dom-wpt-skip-existence-check"><code>skip-existence-check</code></dfn> boolean attribute.
59115913
This allows you to point to private tests,
59125914
such as those in browser-specific repos,
59135915
without receiving errors about those tests missing
59145916
from the main WPT repository.</p>
59155917
</ul>
5916-
<p>By default, <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements don’t display in the output document;
5918+
<p>By default, <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements don’t display in the output document;
59175919
they’re intended to annotate the source file to help with spec authoring,
59185920
and trigger Bikeshed’s checks.
59195921
If you want to produce a test-annotated version of the output,
59205922
specify the <a data-link-type="dfn" href="#metadata-wpt-display" id="ref-for-metadata-wpt-display">WPT Display</a> metadata with the value "open" or "closed";
5921-
all of the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements will become usefully-formatted lists of their contained tests,
5923+
all of the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements will become usefully-formatted lists of their contained tests,
59225924
with links to <a href="https://wpt.fyi">wpt.fyi</a>,
59235925
the live test on <a href="https://w3c-test.org">w3c-test.org</a>,
59245926
and the source code on <a href="https://github.com/web-platform-tests/wpt">GitHub</a>.
59255927
The difference between "open" and "closed" is that
5926-
with the former, all <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements are initially displayed in a collapsed state
5928+
with the former, all <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> elements are initially displayed in a collapsed state
59275929
to avoid getting in the way of reading the document,
59285930
while "open" causes them to be expanded initially.
59295931
In either case, the use can interactively collapse or expand each element.</p>
59305932
<figure>
59315933
<img height="195" src="images/wpt-display-open.png" srcset="images/wpt-display-open.png 2x" width="600">
59325934
<figcaption> When <code>WPT Display: open</code> is set,
5933-
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element turns into a "TESTS" block. </figcaption>
5935+
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element turns into a "TESTS" block. </figcaption>
59345936
</figure>
59355937
<figure>
59365938
<img height="104" src="images/wpt-display-closed.png" srcset="images/wpt-display-closed.png 2x" width="600">
59375939
<figcaption> When <code>WPT Display: closed</code> is set,
5938-
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element also turns into a "TESTS" block,
5940+
the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element also turns into a "TESTS" block,
59395941
but it is initially collapsed. </figcaption>
59405942
</figure>
59415943
<p class="note" role="note"><span class="marker">Note:</span> For compatibility with earlier versions of Bikshed,
59425944
"inline" is accepted as a synonym of "open".</p>
5943-
<p>When the <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/interaction.html#attr-hidden" id="ref-for-attr-hidden">hidden</a> attribute is set on the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element,
5945+
<p>When the <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/interaction.html#attr-hidden" id="ref-for-attr-hidden">hidden</a> attribute is set on the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element,
59445946
Bikeshed will take the tests listed in that element into account,
59455947
but exclude them from the output,
59465948
even when producing a test-annotated version.</p>
@@ -5953,12 +5955,12 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data
59535955
In such cases,
59545956
listing the tests in a <code class="highlight"><c- p>&lt;</c-><c- f>wpt</c-> <c- e>hidden</c-><c- p>></c-></code> element silences the warnings,
59555957
without adding anything irrelevant to the output.</p>
5956-
<p>Information about a set of tests described in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element
5958+
<p>Information about a set of tests described in a <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element
59575959
can be provided to the reader
5958-
by writing it in the <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title">title</a> attribute of the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element.
5960+
by writing it in the <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title">title</a> attribute of the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①">wpt</a></code> element.
59595961
This will be inserted in the output as an introductory paragraph
59605962
before the test list.
5961-
A <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-lang" id="ref-for-attr-lang">lang</a> or <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-dir" id="ref-for-attr-dir">dir</a> set on the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element①⑨">wpt</a></code> element
5963+
A <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-lang" id="ref-for-attr-lang">lang</a> or <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-dir" id="ref-for-attr-dir">dir</a> set on the <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element②⓪">wpt</a></code> element
59625964
will apply to the introductory paragraph if there is one.</p>
59635965
<div class="example" id="example-1076be64">
59645966
<a class="self-link" href="#example-1076be64"></a>
@@ -5977,15 +5979,15 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="element" data-export data
59775979
<p>The test block in the example above would be rendered as follows:</p>
59785980
<figure> <img alt="A WPT element with a list of tests, preceded by an introductory paragraph" height="168" src="images/tests-with-intro.png" srcset="images/tests-with-intro.png 2x" width="624"> </figure>
59795981
</div>
5980-
<p>If multiple <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element②">wpt</a></code> follow each other in the source,
5982+
<p>If multiple <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element②">wpt</a></code> follow each other in the source,
59815983
with nothing between them other than whitespace,
59825984
they will be fused together in the output,
59835985
visually taking less space than if they remained as separate elements.
59845986
This will work even
59855987
if they have different <a data-link-type="element-attr" href="#element-attrdef-wpt-pathprefix" id="ref-for-element-attrdef-wpt-pathprefix">pathprefix</a> or <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title①">title</a> attributes.
59865988
When merging elements with <a data-link-type="element-attr" href="https://html.spec.whatwg.org/multipage/dom.html#attr-title" id="ref-for-attr-title②">title</a> attributes,
59875989
the tests listed in each element will be preceded by the relevant introductory paragraph,
5988-
and visually separated from tests listed in different <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element②">wpt</a></code> elements.</p>
5990+
and visually separated from tests listed in different <code><a data-link-type="element" href="#wpt-element" id="ref-for-wpt-element②">wpt</a></code> elements.</p>
59895991
<p class="note" role="note"><span class="marker">Note:</span> More tools and options for integrating with WPT will be developed in the future.</p>
59905992
<h3 class="heading settled" data-level="11.2" id="updating-tests"><span class="secno">11.2. </span><span class="content">Updating Lists of Tests</span><a class="self-link" href="#updating-tests"></a></h3>
59915993
<p>If Bikeshed reports that a test doesn’t exist,
@@ -7497,7 +7499,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
74977499
"railroad-terminal": {"dfnID":"railroad-terminal","dfnText":"Terminal","external":false,"refSections":[],"url":"#railroad-terminal"},
74987500
"railroad-zeroormore": {"dfnID":"railroad-zeroormore","dfnText":"ZeroOrMore","external":false,"refSections":[{"refs":[{"id":"ref-for-railroad-zeroormore"}],"title":"13.1. The Diagram Language"}],"url":"#railroad-zeroormore"},
74997501
"soft-boolish": {"dfnID":"soft-boolish","dfnText":"soft boolish","external":false,"refSections":[{"refs":[{"id":"ref-for-soft-boolish"},{"id":"ref-for-soft-boolish\u2460"}],"title":"4. Metadata"}],"url":"#soft-boolish"},
7500-
"wpt-element": {"dfnID":"wpt-element","dfnText":"11.1. \nAnnotating Specs with Tests: the wpt element","external":false,"refSections":[{"refs":[{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2460"},{"id":"ref-for-wpt-element\u2461"}],"title":"4. Metadata"},{"refs":[{"id":"ref-for-wpt-element\u2462"},{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2463"},{"id":"ref-for-wpt-element\u2464"},{"id":"ref-for-wpt-element\u2465"},{"id":"ref-for-wpt-element\u2466"},{"id":"ref-for-wpt-element\u2467"},{"id":"ref-for-wpt-element\u2468"},{"id":"ref-for-wpt-element\u2460\u24ea"},{"id":"ref-for-wpt-element\u2460\u2460"},{"id":"ref-for-wpt-element\u2460\u2461"},{"id":"ref-for-wpt-element\u2460\u2462"},{"id":"ref-for-wpt-element\u2460\u2463"},{"id":"ref-for-wpt-element\u2460\u2464"},{"id":"ref-for-wpt-element\u2460\u2465"},{"id":"ref-for-wpt-element\u2460\u2466"},{"id":"ref-for-wpt-element\u2460\u2467"},{"id":"ref-for-wpt-element\u2460\u2468"},{"id":"ref-for-wpt-element\u2461\u24ea"},{"id":"ref-for-wpt-element\u2461\u2460"}],"title":"11.1. \nAnnotating Specs with Tests: the wpt element"}],"url":"#wpt-element"},
7502+
"wpt-element": {"dfnID":"wpt-element","dfnText":"11.1. \nAnnotating Specs with Tests: the wpt element","external":false,"refSections":[{"refs":[{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2460"},{"id":"ref-for-wpt-element\u2461"}],"title":"4. Metadata"},{"refs":[{"id":"ref-for-wpt-element\u2462"},{"id":"ref-for-wpt-element"},{"id":"ref-for-wpt-element\u2463"},{"id":"ref-for-wpt-element\u2464"},{"id":"ref-for-wpt-element\u2465"},{"id":"ref-for-wpt-element\u2466"},{"id":"ref-for-wpt-element\u2467"},{"id":"ref-for-wpt-element\u2468"},{"id":"ref-for-wpt-element\u2460\u24ea"},{"id":"ref-for-wpt-element\u2460\u2460"},{"id":"ref-for-wpt-element\u2460\u2461"},{"id":"ref-for-wpt-element\u2460\u2462"},{"id":"ref-for-wpt-element\u2460\u2463"},{"id":"ref-for-wpt-element\u2460\u2464"},{"id":"ref-for-wpt-element\u2460\u2465"},{"id":"ref-for-wpt-element\u2460\u2466"},{"id":"ref-for-wpt-element\u2460\u2467"},{"id":"ref-for-wpt-element\u2460\u2468"},{"id":"ref-for-wpt-element\u2461\u24ea"},{"id":"ref-for-wpt-element\u2461\u2460"},{"id":"ref-for-wpt-element\u2461\u2461"}],"title":"11.1. \nAnnotating Specs with Tests: the wpt element"}],"url":"#wpt-element"},
75017503
};
75027504

75037505
document.addEventListener("DOMContentLoaded", ()=>{

0 commit comments

Comments
 (0)