You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR:
- Configures cspell for this repository
- Fixes all reported typos
- Adds a custom dictionary for words that should always be valid, and
defines appropriate one-offs for individual files
- Adds an npm script and a github workflow to run on PRs ([example
run](https://github.com/kfranqueiro/wcag/actions/runs/17648224537/job/50151828441?pr=3))
- Documents how to add words in the README
Credit to @fstrr for getting the idea from the aria-practices repo and
initially experimenting with it on wcag3 and some other repos
Copy file name to clipboardExpand all lines: README.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ If you are providing term definitions along with your SC, include them in the re
94
94
<dd>{Definition}</dd>
95
95
```
96
96
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.
98
98
99
99
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>`.
100
100
@@ -141,7 +141,7 @@ New techniques should use a filename that is derived from a shortened version of
141
141
142
142
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:
@@ -162,7 +162,7 @@ Once a technique branch and file is set up, populate the content and request rev
162
162
* 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.
163
163
* When the technique is ready for review, make a pull request into the main branch.
164
164
* If you wish to reference the draft technique from an Understanding document, use the technique's rawgit URI.
165
-
* After a technique is approved, the chairs will assign it an ID and update links to it in the Undestanding documents.
165
+
* After a technique is approved, the chairs will assign it an ID and update links to it in the Understanding documents.
166
166
167
167
### Formatting Techniques
168
168
@@ -190,6 +190,18 @@ obsoleteMessage: |
190
190
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`.
191
191
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.
192
192
193
+
## Spell-checking
194
+
195
+
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).
196
+
197
+
### Adding valid words
198
+
199
+
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.
200
+
201
+
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.)
202
+
203
+
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.
204
+
193
205
## Version-specific Documentation
194
206
195
207
Informative documents are generated from the same source files for both WCAG 2.2 and 2.1,
0 commit comments