Skip to content

Commit 1c754a7

Browse files
committed
Add cspell and fix typos
1 parent 568f662 commit 1c754a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1390
-78
lines changed

.github/workflows/cspell.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check Spelling
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
spellcheck:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: streetsidesoftware/cspell-action@v7

11ty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ XSLT-based build process using Eleventy.
88
Make sure you have Node.js installed. This has primarily been tested with v20,
99
the current LTS at time of writing.
1010

11-
If you use [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm) to manage multiple Node.js versions,
11+
If you use [`fnm`](https://github.com/Schniz/fnm) or [`nvm`](https://github.com/nvm-sh/nvm) to manage multiple Node.js versions,
1212
you can switch to the recommended version by typing `fnm use` or `nvm use`
1313
(with no additional arguments) while in the repository directory.
1414

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ If you are providing term definitions along with your SC, include them in the re
9494
<dd>{Definition}</dd>
9595
```
9696

97-
The ```dfn``` element tells the script that this is a term and causes special styling and linking features. To link to a term, use an `<a>` element without an `href` attribute; if the link text is the same as the term, the link will be correctly generated. For example, if there is a term `<dfn>web page</dfn>` on the page, a link in the form of `<a>web page</a>` will result in a proper link.
97+
The `dfn` element tells the script that this is a term and causes special styling and linking features. To link to a term, use an `<a>` element without an `href` attribute; if the link text is the same as the term, the link will be correctly generated. For example, if there is a term `<dfn>web page</dfn>` on the page, a link in the form of `<a>web page</a>` will result in a proper link.
9898

9999
If the link text has a different form from the canonical term, e.g., "web pages" (note the plural), you can provide a hint on the term definition with the `data-lt` attribute. In this example, modify the term to be `<dfn data-lt="web pages">web page</dfn>`. Multiple alternate names for the term can be separated with pipe characters, with no leading or trailing space, e.g., `<dfn data-lt="web pages|page|pages">web page</dfn>`.
100100

@@ -139,7 +139,7 @@ New techniques should use a filename that is derived from a shortened version of
139139

140140
Each new technique should be created in a new branch. Set-up of the branch and file is automated via the create-techniques.sh script, which can be run with bash. The command line is:
141141

142-
```Shell
142+
```
143143
bash create-techniques.sh <technology> <filename> <type> "<title>"
144144
```
145145

@@ -160,7 +160,7 @@ Once a technique branch and file is set up, populate the content and request rev
160160
* Populate the template with appropriate content, using other techniques as examples for code formatting choices. Keep the existing structural sections from the template in place.
161161
* When the technique is ready for review, make a pull request into the main branch.
162162
* If you wish to reference the draft technique from an Understanding document, use the technique's rawgit URI.
163-
* After a technique is approved, the chairs will assign it an ID and update links to it in the Undestanding documents.
163+
* After a technique is approved, the chairs will assign it an ID and update links to it in the Understanding documents.
164164

165165
### Formatting Techniques
166166

@@ -188,6 +188,18 @@ obsoleteMessage: |
188188
In cases where entire technologies are obsolete (e.g. Flash and Silverlight), these properties may also be specified at the technique subdirectory level, e.g. via `techniques/flash/flash.11tydata.json`.
189189
Note that this case specifically requires JSON format, as this is consumed by both Eleventy and additional code in the build process used to assemble techniques data.
190190

191+
## Spell-checking
192+
193+
Both the normative and informative content is checked for spelling errors using [cspell](https://cspell.org/). This check runs on pull requests, and can be run locally via `npm run cspell` (requires [Node.js](https://nodejs.org/); remember to run `npm i` first if you haven't recently).
194+
195+
### Adding valid words
196+
197+
If a word is flagged that should be allowed anywhere it appears, add a line to the top-level `custom-words.txt` file, ideally under the appropriate section in alphabetical order.
198+
199+
If a word is flagged that should be allowed in a specific file, but should be considered incorrect elsewhere, add an entry to the `overrides` list in the top-level `cspell.yml` file. (Several examples already exist for reference.)
200+
201+
Note that both inline code and code blocks are ignored, so if you are using a term that pertains to a specific language/syntax, consider enclosing it in `<code>` or `<pre>` as appropriate.
202+
191203
## Version-specific Documentation
192204

193205
Informative documents are generated from the same source files for both WCAG 2.2 and 2.1,

cspell.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
version: "0.2"
2+
allowCompoundWords: true
3+
minWordLength: 3
4+
dictionaries:
5+
- en_US
6+
- companies
7+
- softwareTerms
8+
- css
9+
- html
10+
- custom
11+
dictionaryDefinitions:
12+
- name: custom
13+
path: custom-words.txt
14+
addWords: true
15+
ignorePaths:
16+
- "_includes/**"
17+
- "acknowledgements/**"
18+
- "conformance-challenges/**"
19+
- "lib/**"
20+
- "requirements/**"
21+
- "wcag20/**"
22+
- "working-examples/**"
23+
- "xslt/**"
24+
- "*.css"
25+
- "*.js"
26+
- "*.json"
27+
- "*.sh"
28+
- "*.ts"
29+
- "*.xml"
30+
- "*.yml"
31+
useGitignore: true
32+
overrides:
33+
# File-specific words are defined here, which should be considered typos elsewhere
34+
- filename: errata/*.html
35+
words: [ccriteria] # Records of corrected typos
36+
- filename: guidelines/input-purposes.html
37+
words: [lle] # Superscript fragment of Mlle
38+
- filename: techniques/*/F32.html
39+
words: [Higashi, Kyo, Miyako] # Japanese examples
40+
- filename: techniques/*/F71.html
41+
words: [ϲоοk] # Intentional Unicode character example
42+
- filename: techniques/*/FLASH17.html
43+
words: [SWFFocus] # Class mentioned only in this page
44+
- filename: techniques/*/FLASH28.html
45+
words: [rulez] # Example in leetspeak
46+
- filename: techniques/*/H34.html
47+
words: [HCTIWS, SDRADNATS, BEW] # Intentionally-reversed words
48+
- filename: techniques/*/H56.html
49+
words: [YTIVITCA, NOITAZILANOITANRETNI] # Intentionally-reversed words
50+
- filename: techniques/*/SVR2.html
51+
words: [jna] # Example file extension
52+
- filename: understanding/*/language-of-parts.html
53+
words: [voyture] # Pronunciation example
54+
- filename: understanding/*/text-spacing.html
55+
words: [drawi, whe] # Examples of text clipping
56+
languageSettings:
57+
- languageId: html
58+
ignoreRegExpList:
59+
# Non-English elements
60+
- /<(\w+)[^>]+lang="(?!en)\w+"[^>]*>.*?<\/\1>/gi
61+
# Encoded citations
62+
- /\[\[.*?\]\]/g
63+
# Other citations
64+
- /\w+ et al\b/g
65+
# pre/code tags
66+
- /<(pre|code)\b[^>]*>[\s\S]*?</\1>/g
67+
# (...) References sections
68+
- /<section>\s*<h\d>[^<]*references</h\d>[\s\S]*?</section>/gi
69+
# Resources (...) sections
70+
- /<section[^>]*>\s*<h\d>\s*resources[^<]*</h\d>[\s\S]*?</section>/gi
71+
# HTML tags
72+
- /<[^>]*>/g
73+
# Namespaces
74+
- /x(mlns|si):\w+/g
75+
- languageId: markdown
76+
ignoreRegExpList:
77+
# Fenced code block
78+
- |
79+
/
80+
^(\s*```).* # Opening ```
81+
[\s\S]*? # Code block
82+
^``` # Closing ```
83+
/gmx
84+
# Inline code
85+
- /`[^`\n]+`/g

custom-words.txt

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Placeholders
2+
GXXX
3+
FXXX
4+
5+
# Expected acronyms and abbreviations
6+
3GPP
7+
ACTF
8+
AGWG
9+
ALS
10+
APG
11+
APNG
12+
ATAG
13+
BCP
14+
BWV
15+
CCID
16+
CEDEX
17+
CIE
18+
CLR
19+
COGA
20+
CVV
21+
DCMI
22+
DFXP
23+
DPUB
24+
DSS
25+
ERCIM
26+
HDR
27+
HFS
28+
ICT
29+
IEC
30+
IDREF
31+
IMS
32+
ISA
33+
LINQ
34+
LVTF
35+
MBASW
36+
MCID
37+
METS
38+
MSAA
39+
MSIL
40+
NOAA
41+
NCX
42+
PCI
43+
PDA
44+
PII
45+
Prt
46+
RDDL
47+
resx
48+
SAMI
49+
Scn
50+
SCR
51+
SDR
52+
SIL
53+
SMIL
54+
SPC
55+
SRT
56+
SVR
57+
TTML
58+
UAAG
59+
UCS
60+
UIA
61+
UWP
62+
VTT
63+
WAI
64+
WCAG
65+
WGBH
66+
WPF
67+
XAP
68+
XYZ
69+
70+
# Proper names
71+
Flesch
72+
Kincaid
73+
Knowbility
74+
McLeish # Study cited in understanding/21/text-spacing.html
75+
Roselli
76+
Smallville
77+
Soueidan
78+
Vanna # Example in G193
79+
YubiKey
80+
Zehe
81+
82+
# Words
83+
auditorily
84+
conferatur # Latin, expansion of "cf."
85+
dyscalculia
86+
genericizing
87+
linearization
88+
look-alikes
89+
mistagged
90+
ʻokina # Hawaiian
91+
parameterizes
92+
reauthentication
93+
resequencing
94+
reskinning
95+
tic-tac-toe
96+
tristimulus
97+
unsynchronized
98+
untimed
99+
untrap

errata/21.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ <h3>Editorial Errata</h3>
205205
<li>
206206
2018-07-11:
207207
In <a href="{{ trUrl }}#reflow">1.4.10 Reflow</a>,
208-
removing a supernumary "Note" indicator from the first note.
208+
removing a supernumerary "Note" indicator from the first note.
209209
({% gh "#429" %})
210210
</li>
211211
<li>

errata/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Example phrasing when linking to a term definition:
6363
In the definition for <a href="{{ trUrl }}#dfn-single-pointer">single pointer</a>
6464
```
6565

66-
(Remember that term definition fraagments always begin with `dfn-`.)
66+
(Remember that term definition fragments always begin with `dfn-`.)
6767

6868
It is possible to reference multiple sections/terms from one erratum,
6969
so long as all of the links remain front-loaded prior to the erratum's details.
@@ -76,7 +76,7 @@ For example:
7676

7777
- updating the red threshold from ... to ...
7878
- removing one note and adding two new notes, including ...
79-
- removing a supernumary "Note" indicator from the first note.
79+
- removing a supernumerary "Note" indicator from the first note.
8080
- correcting the word ... to ...
8181

8282
### GitHub PR or commit

0 commit comments

Comments
 (0)