Skip to content

Commit d933841

Browse files
authored
Add field description for comma-separated fields (#66)
- Add field description for 4 more fields: keywords, programmingLanguage, runtimePlatform, and operatingSystem, based on separator value at `splittedCodemetaFields`: https://github.com/codemeta/codemeta-generator/blob/41ef64885a97cdccd15de3261483e640c897317c/js/codemeta_generation.js#L101-L107 - Add missing aria-describedby attribute for relatedLink and softwareRequirements labels - Minor casing fix: - Make casing of labels consistent - using "Title case" (uppercase at first letter of first word only), like the majority of the labels. - "SPDX licence list" -> "SPDX License List": from its webpage, looks like a proper noun (from its Caps Spelling in every instances)
1 parent 41ef648 commit d933841

File tree

1 file changed

+49
-38
lines changed

1 file changed

+49
-38
lines changed

index.html

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,37 @@ <h1>CodeMeta generator v3.0</h1>
5050
<span class="field-description" id="name_descr">the software title</span>
5151
</p>
5252

53-
<p title="a brief description of the software">
53+
<p title="A brief description of the software">
5454
<label for="description">Description</label>
5555
<textarea rows="4" cols="50"
5656
name="description" id="description"
5757
placeholder="My Software computes ephemerides and orbit propagation. It has been developed from early ´80." ></textarea>
5858
</p>
5959

6060

61-
<p title="The date on which the software was created.">
61+
<p title="The date on which the software was created">
6262
<label for="dateCreated">Creation date</label>
6363
<input type="text" name="dateCreated" id="dateCreated"
6464
placeholder="YYYY-MM-DD" pattern="\d{4}-\d{2}-\d{2}" />
6565
</p>
6666

67-
<p title="Date of first publication.">
67+
<p title="Date of first publication">
6868
<label for="datePublished">First release date</label>
6969
<input type="text" name="datePublished" id="datePublished"
7070
placeholder="YYYY-MM-DD" pattern="\d{4}-\d{2}-\d{2}" />
7171
</p>
7272

73-
<p>
73+
<p title="License(s) under which the software is published">
7474
<label for="license">License(s)</label>
7575
<input list="licenses" name="license" id="license"
7676
aria-describedby="licenses_descr"> <!-- TODO: insert placeholder -->
7777

7878
<datalist id="licenses">
7979
</datalist>
80-
<!-- This datalist is be filled automatically -->
80+
<!-- This datalist is to be filled automatically -->
8181

8282
<br />
83-
<span class="field-description" id="licenses_descr">from <a href="https://spdx.org/licenses/">SPDX licence list</a></span>
84-
83+
<span class="field-description" id="licenses_descr">from <a href="https://spdx.org/licenses/">SPDX License List</a>; select from the list, one by one</span>
8584
<div id="selected-licenses">
8685
<!-- This div is to be filled as the user selects licenses -->
8786
</div>
@@ -98,7 +97,7 @@ <h1>CodeMeta generator v3.0</h1>
9897

9998
<br />
10099
<span class="field-description" id="identifier_descr">
101-
such as ISBNs, GTIN codes, UUIDs etc.. <a href="http://schema.org/identifier">http://schema.org/identifier</a>
100+
such as ISBNs, GTIN codes, UUIDs, etc. see <a href="http://schema.org/identifier">http://schema.org/identifier</a>
102101
</span>
103102
</p>
104103
<!-- TODO:define better
@@ -125,7 +124,9 @@ <h1>CodeMeta generator v3.0</h1>
125124
<p title="Comma-separated list of keywords">
126125
<label for="keywords">Keywords</label>
127126
<input type="text" name="keywords" id="keywords"
128-
placeholder="ephemerides, orbit, astronomy" />
127+
placeholder="ephemerides, orbit, astronomy"
128+
aria-describedby="keywords_descr" />
129+
<span class="field-description" id="keywords_descr">separated by commas (<code>,</code>)</span>
129130
</p>
130131

131132
<p title="Funding / grant">
@@ -152,19 +153,19 @@ <h1>CodeMeta generator v3.0</h1>
152153
<fieldset id="fieldsetDevelopmentCommunity" class="leafFieldset">
153154
<legend>Development community / tools</legend>
154155

155-
<p title="Link to the repository where the un-compiled, human readable code and related code is located (SVN, Git, GitHub, CodePlex, institutional GitLab instance, etc.).">
156+
<p title="Link to the repository where the un-compiled, human readable code and related code is located (SVN, Git, GitHub, CodePlex, institutional GitLab instance, etc.)">
156157
<label for="codeRepository">Code repository</label>
157158
<input type="URL" name="codeRepository" id="codeRepository"
158159
placeholder="git+https://github.com/You/RepoName.git" />
159160
</p>
160161

161-
<p title="Link to continuous integration service (Travis-CI, Gitlab CI, etc.).">
162+
<p title="Link to continuous integration service (Travis-CI, Gitlab CI, etc.)">
162163
<label for="contIntegration">Continuous integration</label>
163164
<input type="URL" name="contIntegration" id="contIntegration"
164165
placeholder="https://travis-ci.org/You/RepoName" />
165166
</p>
166167

167-
<p title="Link to a place for users/developpers to report and manage bugs (JIRA, GitHub issues, etc.).">
168+
<p title="Link to a place for users/developpers to report and manage bugs (JIRA, GitHub issues, etc.)">
168169
<label for="issueTracker">Issue tracker</label>
169170
<input type="URL" name="issueTracker" id="issueTracker"
170171
placeholder="https://github.com/You/RepoName/issues" />
@@ -175,40 +176,50 @@ <h1>CodeMeta generator v3.0</h1>
175176
<br />
176177
<textarea rows="4" cols="50"
177178
name="relatedLink" id="relatedLink"
178-
placeholder="https://www.example.com"></textarea>
179+
placeholder=
180+
"https://www.example.com
181+
https://www.example.org"
182+
aria-describedby="relatedLink_descr"></textarea>
179183
<span class="field-description" id="relatedLink_descr">URL(s), one URL per line</span>
180184
</p>
181185
</fieldset>
182186

183187
<fieldset id="fieldsetRuntime" class="leafFieldset">
184188
<legend>Run-time environment</legend>
185189

186-
<p title="Programming Languages, separated by commas">
187-
<label for="programmingLanguage">Programming Language</label>
190+
<p title="Programming languages, separated by commas">
191+
<label for="programmingLanguage">Programming language</label>
188192
<input type="text" name="programmingLanguage" id="programmingLanguage"
189-
placeholder="C#, Java, Python 3" />
193+
placeholder="C#, Java, Python 3"
194+
aria-describedby="programmingLanguage_descr" />
195+
<span class="field-description" id="programmingLanguage_descr">separated by commas (<code>,</code>)</span>
190196
</p>
191197

192-
<p title="Runtime Platforms, separated by commas">
193-
<label for="runtimePlatform">Runtime Platform</label>
198+
<p title="Runtime platforms, separated by commas">
199+
<label for="runtimePlatform">Runtime platform</label>
194200
<input type="text" name="runtimePlatform" id="runtimePlatform"
195-
placeholder=".NET, JVM" />
201+
placeholder=".NET, JVM"
202+
aria-describedby="runtimePlatform_descr" />
203+
<span class="field-description" id="runtimePlatform_descr">separated by commas (<code>,</code>)</span>
196204
</p>
197205

198-
<p title="Operating Systems, separated by commas">
199-
<label for="operatingSystem">Operating System</label>
206+
<p title="Operating systems, separated by commas">
207+
<label for="operatingSystem">Operating system</label>
200208
<input type="text" name="operatingSystem" id="operatingSystem"
201-
placeholder="Android 1.6, Linux, Windows, macOS" />
209+
placeholder="Android 1.6, Linux, Windows, macOS"
210+
aria-describedby="operatingSystem_descr" />
211+
<span class="field-description" id="operatingSystem_descr">separated by commas (<code>,</code>)</span>
202212
</p>
203213

204-
<p title="Required software to run/use this one.">
214+
<p title="Required software to run/use this one">
205215
<label for="softwareRequirements">Other software requirements</label>
206216
<br />
207217
<textarea rows="4" cols="50"
208218
name="softwareRequirements" id="softwareRequirements"
209219
placeholder=
210220
"https://www.python.org/downloads/release/python-3130/
211-
https://github.com/psf/requests"></textarea>
221+
https://github.com/psf/requests"
222+
aria-describedby="softwareRequirements_descr"></textarea>
212223
<span class="field-description" id="softwareRequirements_descr">URL(s), one URL per line</span>
213224
</p>
214225
</fieldset>
@@ -222,7 +233,7 @@ <h1>CodeMeta generator v3.0</h1>
222233
placeholder="1.0.0" />
223234
</p>
224235

225-
<p title="The date on which the software was most recently modified.">
236+
<p title="The date on which the software was most recently modified">
226237
<label for="dateModified">Release date</label>
227238
<input type="text" name="dateModified" id="dateModified"
228239
placeholder="YYYY-MM-DD" pattern="\d{4}-\d{2}-\d{2}" />
@@ -252,7 +263,7 @@ <h1>CodeMeta generator v3.0</h1>
252263
<legend>Editorial review</legend>
253264

254265
<p title="Scholarly article describing this software">
255-
<label for="referencePublication">Reference Publication</label>
266+
<label for="referencePublication">Reference publication</label>
256267
<input type="URL" name="referencePublication" id="referencePublication"
257268
placeholder="https://doi.org/10.1000/xyz123" />
258269
</p>
@@ -272,10 +283,10 @@ <h1>CodeMeta generator v3.0</h1>
272283
</fieldset>
273284

274285
<fieldset id="fieldsetAdditionalInfo" class="leafFieldset">
275-
<legend>Additional Info</legend>
286+
<legend>Additional information</legend>
276287

277-
<p title="Development Status">
278-
<label for="developmentStatus">Development Status</label>
288+
<p title="Development status">
289+
<label for="developmentStatus">Development status</label>
279290
<datalist id="developmentStatuses">
280291
<option value="concept">
281292
<option value="wip">
@@ -295,16 +306,16 @@ <h1>CodeMeta generator v3.0</h1>
295306
</span>
296307
</p>
297308

298-
<p title="Source Code of">
299-
<label for="isSourceCodeOf">Is Source Code of</label>
309+
<p title="Source code of">
310+
<label for="isSourceCodeOf">Is source code of</label>
300311
<input type="text" name="isSourceCodeOf" id="isSourceCodeOf"
301312
placeholder="Bigger Application" />
302313
</p>
303314

304315
<p title="Part of">
305316
<label for="isPartOf">Is part of</label>
306317
<input type="URL" name="isPartOf" id="isPartOf"
307-
placeholder="http://The.Bigger.Framework.org" />
318+
placeholder="http://The.Bigger.Framework.org" />
308319
</p>
309320
</fieldset>
310321

@@ -339,17 +350,17 @@ <h1>CodeMeta generator v3.0</h1>
339350
</form>
340351
<form>
341352
<input type="button" id="generateCodemetaV3" value="Generate codemeta.json v3.0" disabled
342-
title="Creates a codemeta.json v3.0 file below, from the information provided above." />
353+
title="Creates a codemeta.json v3.0 file below, from the information provided above" />
343354
<input type="button" id="generateCodemetaV2" value="Generate codemeta.json v2.0" disabled
344-
title="Creates a codemeta.json v2.0 file below, from the information provided above." />
355+
title="Creates a codemeta.json v2.0 file below, from the information provided above" />
345356
<input type="button" id="resetForm" value="Reset form"
346-
title="Erases all fields." />
357+
title="Erases all fields above" />
347358
<input type="button" id="validateCodemeta" value="Validate codemeta.json" disabled
348-
title="Checks the codemeta.json file below is valid, and displays errors." />
359+
title="Checks the codemeta.json file below is valid, and displays errors" />
349360
<input type="button" id="importCodemeta" value="Import codemeta.json" disabled
350-
title="Fills the fields above based on the codemeta.json file below." />
361+
title="Fills the fields above based on the codemeta.json file below" />
351362
<a id="downloadCodemeta"><input type="button" value="Download codemeta.json" disabled
352-
title="Download the codemeta.json file as displayed below." /></a>
363+
title="Download the codemeta.json file as displayed below" /></a>
353364
</form>
354365

355366
<p id="errorMessage">

0 commit comments

Comments
 (0)