Skip to content

Commit 650f82c

Browse files
authored
Add initial description guidelines (web-platform-dx#789)
1 parent 38c2128 commit 650f82c

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

docs/README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,111 @@ The identifier should match the name, with these additional guidelines:
6464
- 👎 Not recommended: `fullscreen-api`
6565
- 👍 Recommended: `user-pseudos`
6666
- 👎 Not recommended: `user-valid-and-user-invalid`
67+
68+
### Descriptions
69+
70+
* Describe, in the active voice, what a feature does or is.
71+
Think about how developers will use it, not abstract technology relationships.
72+
Start with a template like this:
73+
74+
- `The <property> <sets> the <noun>.`
75+
- `The <interface> <verbs> the <noun>.`
76+
- `The <type> represents <nouns>.`
77+
- `<format> is a <kind> or <variety>`.
78+
79+
* Description text must stand alone.
80+
It should not refer to text, images, or other content outside the short description.
81+
Try reading the sentence aloud.
82+
Does it still make sense without mentioning the name or ID?
83+
84+
* Start descriptions with words that are distinct to the feature.
85+
For example, prefer "The `some-prop` CSS property…" and avoid "The CSS property `some-prop`…."
86+
87+
* Avoid circular descriptions.
88+
For example, prefer "The `filter()` method returns the items…" over "The `filter()` method filters the items…."
89+
90+
* It's OK to use the second person ("you", "your", and "yours") to refer to the audience when needed.
91+
For example, "The interface allows you to…."
92+
([#738](https://github.com/web-platform-dx/web-features/pull/742))
93+
94+
* Never mention support or standards status.
95+
This information *will* go out of date and sooner than you think.
96+
97+
* For every rule, there's a counterexample.
98+
Use your best judgement before writing something absurd.
99+
100+
* See the [word and phrase list](#word-and-phrase-list) for specific guidelines.
101+
102+
#### Word and phrase list
103+
104+
##### allows
105+
106+
OK in usage such as "allows you to…."
107+
Avoid where there is no named actor, as in "the feature allows magic to happen."
108+
([#738](https://github.com/web-platform-dx/web-features/pull/738#discussion_r1537760761))
109+
110+
You can often omit it with gerunds.
111+
For example, prefer "The widget sends…" over "The widget allows sending…."
112+
113+
##### also known as
114+
115+
Use this phrase to call attention to other names this feature has gone by.
116+
Use it at the start of a sentence at the end of the description.
117+
For example:
118+
119+
> The `some-property` CSS property sets the … value. Also known as `<alias>`.
120+
([#628](https://github.com/web-platform-dx/web-features/pull/628/files/a9898862cb631c83ea16f1233b3c5c4353bf7a52#r1516293423))
121+
122+
##### defines
123+
124+
Avoid.
125+
See [sets](#sets).
126+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491))
127+
128+
##### determines
129+
130+
Avoid.
131+
See [sets](#sets).
132+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491))
133+
134+
##### elements
135+
136+
Avoid "element" in reference to things that are not HTML elements.
137+
For example, an array of objects has "items", not "elements."
138+
([#750](https://github.com/web-platform-dx/web-features/pull/750#discussion_r1543011420))
139+
140+
##### enables
141+
142+
Avoid, except in the sense of to turn on or activate.
143+
See [allows](#allows).
144+
([#750](https://github.com/web-platform-dx/web-features/pull/750#discussion_r1547382081))
145+
146+
##### for example
147+
148+
Don't use it as a coordinating conjunction; start a new sentence instead.
149+
For example, this is an example.
150+
([#738](https://github.com/web-platform-dx/web-features/pull/738#discussion_r1537762579), [#742](https://github.com/web-platform-dx/web-features/pull/742))
151+
152+
##### is used to
153+
154+
Omit "is used" where there's no loss in meaning.
155+
For example, prefer "The feature reads…" over "The feature is used to read…"
156+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635981))
157+
158+
##### provides
159+
160+
Avoid, especially with gerunds.
161+
For example, prefer the "The feature writes to…" over "The feature provides writing to…."
162+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491))
163+
164+
##### sets
165+
166+
Prefer this over multisyllabic alternatives, such as "defines", "determines", or "specifies".
167+
Use "The property sets…" but never "The property defines…."
168+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491))
169+
170+
##### specifies
171+
172+
Avoid.
173+
See [sets](#sets).
174+
([#727](https://github.com/web-platform-dx/web-features/pull/727#discussion_r1537635491))

0 commit comments

Comments
 (0)