Skip to content

Commit 926495c

Browse files
Remove allowCompoundWords from cspell config to catch more errors (#4916)
This applies a learning I gained while working on the WCAG 3 repo: it turns out that while `allowCompoundWords` can be convenient, it causes cspell to miss legitimate typos, as it essentially allows various words or parts of words to be stitched together, even if the outcome isn't a real word. Removing `allowCompoundWords: true` results in many more failures. Some are typos or compounds that would typically be hyphenated, which I've fixed. Some are valid words or reasonable exceptions, so I've added those either to `custom-words.txt` for cases that should be universally allowed, or within `cspell.yml` as exceptions to specific files or folders. There were a couple of errors within `guidelines/` that could be considered legitimate, but I chose to ignore them for now, and can send a separate, more focused PR for editorial fixes within the recommendation. Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
1 parent d4cae73 commit 926495c

48 files changed

Lines changed: 151 additions & 98 deletions

Some content is hidden

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

‎cspell.yml‎

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: "0.2"
2-
allowCompoundWords: true
32
minWordLength: 3
3+
language:
4+
- en-us
45
dictionaries:
5-
- en_US
66
- companies
77
- softwareTerms
88
- css
@@ -33,24 +33,44 @@ ignorePaths:
3333
useGitignore: true
3434
overrides:
3535
# File-specific words are defined here, which should be considered typos elsewhere
36+
- filename: README.md
37+
words: [rawgit] # TODO: Any references to rawgit should really be updated
3638
- filename: errata/*.html
37-
words: [ccriteria] # Records of corrected typos
39+
words: [ccriteria, critera, dismissable] # Records of corrected typos
40+
- filename: guidelines/sc/21/content-on-hover-or-focus.html
41+
words: [nonmodal] # Exists in current publication
42+
- filename: guidelines/terms/20/image-of-text.html
43+
words: [nametag] # Exists in current publication
44+
- filename: guidelines/relative-luminance.html
45+
words: [colour] # GB spelling used in citations
3846
- filename: guidelines/input-purposes.html
3947
words: [lle] # Superscript fragment of Mlle
40-
- filename: techniques/*/F32.html
48+
- filename: techniques/aria/ARIA21.html
49+
words: [samexample] # Invalid email example
50+
- filename: techniques/failures/F32.html
4151
words: [Higashi, Kyo, Miyako] # Japanese examples
42-
- filename: techniques/*/F71.html
52+
- filename: techniques/failures/F71.html
4353
words: [ϲоοk] # Intentional Unicode character example
44-
- filename: techniques/*/FLASH17.html
45-
words: [SWFFocus] # Class mentioned only in this page
46-
- filename: techniques/*/FLASH28.html
54+
- filename: techniques/failures/F83.html
55+
words: [quickcheck] # Used under Tests
56+
- filename: techniques/flash/*.html
57+
words: [Actionscript, hotspot, hotspots, movieclip, SWFFocus] # Flash-specific concepts
58+
- filename: techniques/flash/FLASH28.html
4759
words: [rulez] # Example in leetspeak
48-
- filename: techniques/*/H34.html
60+
- filename: techniques/general/G60.html
61+
words: [Binfor] # Example
62+
- filename: techniques/general/G130.html
63+
words: [Ourtown] # Example
64+
- filename: techniques/html/H34.html
4965
words: [HCTIWS, SDRADNATS, BEW] # Intentionally-reversed words
50-
- filename: techniques/*/H56.html
66+
- filename: techniques/html/H56.html
5167
words: [YTIVITCA, NOITAZILANOITANRETNI] # Intentionally-reversed words
52-
- filename: techniques/*/SVR2.html
68+
- filename: techniques/pdf/PDF*.html
69+
words: [pushbuttons] # PDF-specific concepts
70+
- filename: techniques/server-side-script/SVR2.html
5371
words: [jna] # Example file extension
72+
- filename: techniques/silverlight/*.html
73+
words: [initparams, namescope, namescopes, templatable, toolsets] # SL-specific concepts
5474
- filename: understanding/*/language-of-parts.html
5575
words: [voyture] # Pronunciation example
5676
- filename: understanding/*/text-spacing.html

‎custom-words.txt‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,53 @@ YubiKey
8080
Zehe
8181

8282
# Words
83+
artboard
8384
auditorily
85+
autoplays
86+
chatbot
87+
chatbots
8488
conferatur # Latin, expansion of "cf."
89+
darknesses # Used in G17 and G145 rather than "brightnesses"
90+
definitionless
91+
dockable
8592
dyscalculia
93+
framesets
94+
formedness
8695
genericizing
96+
hoverable
97+
implementability
98+
infographic
99+
infographics
100+
labelable
101+
leetspeak
87102
linearization
88103
look-alikes
104+
microdata
89105
mistagged
106+
NAVDIR # MSAA
107+
noninstitutionalized
90108
ʻokina # Hawaiian
91109
parameterizes
110+
passcodes
111+
portlet
92112
reauthentication
113+
refreshable
93114
resequencing
115+
reskin
116+
reskinned
94117
reskinning
118+
scriptable
119+
Silverlight
120+
spacebar
121+
subcomponent
122+
subcomponents
123+
subsetted # e.g. Unicode
95124
tic-tac-toe
125+
timecode
126+
timecodes
127+
trackpad
96128
tristimulus
97129
unsynchronized
98130
untimed
99131
untrap
132+
webmail

‎techniques/client-side-script/SCR35.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h3>Link that runs a script and has no fallback for non-scripted browsers</h3>
3838
</section>
3939
<section class="example">
4040
<h3>Link that runs script, but navigates to another page when script is not available</h3>
41-
<p>This approach can be used to create sites that don't rely on script, if and only if the navigation target provides the same functionality as the script. This example is identical to the example 1, except that its <code>href</code> is now set to a real page, dostuff.html. The dostuff.html page must provide the same functionality as the script. The "<code>return false;</code>" at the end of the <code>doStuff()</code> event handling function tells the browser not to navigate to the URI. Without it, the browser would navigate to dostuff.html after the script ran.</p>
41+
<p>This approach can be used to create sites that don't rely on script, if and only if the navigation target provides the same functionality as the script. This example is identical to the example 1, except that its <code>href</code> is now set to a real page, <code>dostuff.html</code>. The <code>dostuff.html</code> page must provide the same functionality as the script. The "<code>return false;</code>" at the end of the <code>doStuff()</code> event handling function tells the browser not to navigate to the URI. Without it, the browser would navigate to <code>dostuff.html</code> after the script ran.</p>
4242

4343
<pre><code class="language-html">&lt;script&gt;
4444
function doStuff() {
@@ -154,4 +154,4 @@ <h2>Resources</h2>
154154
</ul>
155155
</section>
156156
</body>
157-
</html>
157+
</html>

‎techniques/client-side-script/SCR38.html‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ <h2>Description</h2>
3030
<h2>Examples</h2>
3131
<section class="example">
3232
<h3>Using JavaScript</h3>
33-
<p>The example uses JavaScript in the "accToggle.js" file to store the initial pre-enhanced version of the web page, created solely from the HTML in the source code, so that it can act as a "conforming alternate version" for any later enhanced versions of the web page; and inserts a toggle link into all enhanced versions of the web page which allows a user to revert the web page back to the stored pre-enhanced "Conforming Alternate Version". Note: The "sayhello.js" file is simply there as an example payload external file, and is to be replaced by any other external scripts which are desired.</p>
34-
<p>The script in the acctoggle.js file stores the pre-enhanced version - assigning the version the url postfix <code>#accessible</code>. Clicking the "WCAG 2 conforming alternate version" link (inserted as the first child of the <code>body</code> element in any enhanced versions) changes the URL to include the postfix <code>#accessible</code> which then resets the html located in the <code>body</code> element and the <code>head</code> element to pre-enhanced code. The pre-enhanced state can be reached from the link, or directly from a URL typed into the browser. In addition, a link is inserted into the pre-enhanced "Conforming Alternate Version" which allows the user to re-enhance the web page (something which can also be done using the web browser's back button).</p>
33+
<p>The example uses JavaScript in the <code>acctoggle.js</code> file to store the initial pre-enhanced version of the web page, created solely from the HTML in the source code, so that it can act as a "conforming alternate version" for any later enhanced versions of the web page; and inserts a toggle link into all enhanced versions of the web page which allows a user to revert the web page back to the stored pre-enhanced "Conforming Alternate Version". Note: The <code>sayhello.js</code> file is simply there as an example payload external file, and is to be replaced by any other external scripts which are desired.</p>
34+
<p>The script in the <code>acctoggle.js</code> file stores the pre-enhanced version - assigning the version the url postfix <code>#accessible</code>. Clicking the "WCAG 2 conforming alternate version" link (inserted as the first child of the <code>body</code> element in any enhanced versions) changes the URL to include the postfix <code>#accessible</code> which then resets the html located in the <code>body</code> element and the <code>head</code> element to pre-enhanced code. The pre-enhanced state can be reached from the link, or directly from a URL typed into the browser. In addition, a link is inserted into the pre-enhanced "Conforming Alternate Version" which allows the user to re-enhance the web page (something which can also be done using the web browser's back button).</p>
3535
<section id="the-javscript">
36-
<h4>acctoggle.js JavaScript:</h4>
36+
<h4><code>acctoggle.js</code> JavaScript</h4>
3737
<pre><code class="language-javascript">window.onload = function(event) {
3838

3939
// store pre-enhanced element content
@@ -96,7 +96,7 @@ <h4>acctoggle.js JavaScript:</h4>
9696
</section>
9797

9898
<section id="the-html">
99-
<h4>HTML web page source code:</h4>
99+
<h4>HTML web page source code</h4>
100100
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
101101
&lt;html lang="en"&gt;
102102
&lt;head&gt;
@@ -110,7 +110,7 @@ <h4>HTML web page source code:</h4>
110110
&lt;/body&gt;
111111
&lt;/html&gt;</code></pre>
112112

113-
<h4>sayhello.js source code</h4>
113+
<h4><code>sayhello.js</code> source code</h4>
114114
<pre><code class="language-javascript">var change = document.querySelector("#change");
115115
change.innerText = "Hello";</code></pre>
116116
</section>
@@ -151,4 +151,4 @@ <h2>Resources</h2>
151151
</ul>
152152
</section>
153153
</body>
154-
</html>
154+
</html>

‎techniques/css/C29.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ <h5>In main.css</h5>
112112
}</code></pre>
113113
</section>
114114

115-
<section id="defaultColours">
115+
<section id="defaultColors">
116116
<h5>In defaultColors.css</h5>
117117
<pre><code class="language-css">body, p {
118118
color:#000000;

‎techniques/failures/F26.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</section>
66
<section id="description">
77
<h2>Description</h2>
8-
<p>The objective of this technique is to show how using a graphical symbol to convey information can make content difficult to comprehend. A graphical symbol may be an image, an image of text or a pictorial or decorative character symbol (glyph) which imparts information nonverbally. Examples of graphical symbols include an image of a red circle with a line through it, a "smiley" face, or a glyph which represents a check mark, arrow, or other symbol but is not the character with that meaning.</p>
8+
<p>The objective of this technique is to show how using a graphical symbol to convey information can make content difficult to comprehend. A graphical symbol may be an image, an image of text or a pictorial or decorative character symbol (glyph) which imparts information non-verbally. Examples of graphical symbols include an image of a red circle with a line through it, a "smiley" face, or a glyph which represents a check mark, arrow, or other symbol but is not the character with that meaning.</p>
99
<p>Assistive technology users may have difficulty determining the meaning of the graphical symbol. If a graphical symbol is used to convey information, provide an alternative using features of the technology or use a different mechanism that can be marked with an alternative to represent the graphical symbol. For example, an image with a text alternative can be used instead of the glyph.</p>
1010
</section>
1111
<section id="examples">

‎techniques/flash/FLASH17.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h3>Explicitly identifying existing focusable html element</h3>
9797
<p>For a large part, this technique is the same as example 1 : </p>
9898
<ul>
9999
<li> The dynamic loading approach by SWFObject is used to load the Flash content </li>
100-
<li> The SWFFocus class needs to be added to the content's sourcepath and initialized in the Flash content </li>
100+
<li> The SWFFocus class needs to be added to the content's source path and initialized in the Flash content </li>
101101
</ul>
102102
<p>For more details about these steps, see example 1. </p>
103103
<p>In this case however, special class names are added to the Flash content object. These class names indicate the ID values of the elements previous and next of the content in the HTML tab order. The class names are: </p>
@@ -187,4 +187,4 @@ <h3>Explicitly identifying existing focusable html element</h3>
187187
<a href="http://www.iheni.com/flash-and-keyboard-access-across-browsers/">Flash and keyboard access across browsers</a> by Henny Swan</li>
188188
</ul>
189189

190-
</section></body></html>
190+
</section></body></html>

‎techniques/flash/FLASH20.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h3>A thick blue border to indicate focus</h3>
5454
<p>The code below shows an example where form component instances are associated with a modified version of the focusRectSkin MovieClip. The result is that the components receive a thick blue border rather than the default thin border Flash provides. The code makes a reference to a modified skin called Focus_custom, which has been added to the movie's library in advance. </p>
5555
<p>Note that the custom version of focusRectSkin also sets a transparent yellow background to increase the visual highlight further. Components such as Buttons and checkboxes will show this background, but TextInput components will not. To ensure the yellow background will still be applied to the TextInput instance, the following workaround is applied: </p>
5656
<ol>
57-
<li> A duplicate version of the TextInput "normal" skin (which can be found in the library at "Component Asssets &gt; TextInputSkins &gt; TextInput_upSkin") is created and edited to show a yellow background. </li>
57+
<li> A duplicate version of the TextInput "normal" skin (which can be found in the library at "Component Assets &gt; TextInputSkins &gt; TextInput_upSkin") is created and edited to show a yellow background. </li>
5858
<li> FocusIn, FocusOut, MouseOver and MouseOut handlers are assigned to the TextInput instance, which temporarily swap the default "normal" skin with the custom "normal" skin while the component is focused or hovered over. </li>
5959
</ol>
6060
<p>Additionally, the button_over skin is duplicated and modified to change the default mouseover highlights for the button component instance. The checkbox_overIcon and checkbox_selectedOverIcon skins are directly modified, which means those changes will be applied to all checkbox instances. </p>

‎techniques/flash/FLASH26.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3>Playing descriptions when cue points are reached</h3>
1919
added to manage the playback of extended audio descriptions.
2020
This class provides event listeners to listen for cue points
2121
in the media that have been identified by the audio description
22-
provider. When these cuepoints are reached, an mp3 file containing
22+
provider. When these cue points are reached, an mp3 file containing
2323
the corresponding description will start playing. The recorded
2424
descriptions have been timed to fit with in the gaps in the
2525
movie's dialog. </p>
@@ -140,4 +140,4 @@ <h3>Providing an additional audio track for descriptions</h3>
140140
<li><a href="../general/G78">G78</a></li>
141141
<li><a href="../general/G69">G69</a></li>
142142
<li><a href="../general/G173">G173</a></li>
143-
</ul></section></body></html>
143+
</ul></section></body></html>

‎techniques/flash/FLASH8.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ <h3>Programmatically adding a group name with the accessible name of radio butto
197197

198198
<p class="working-example">For an illustration of this approach, see the <a href="../../working-examples/flash-grouped_form_controls/">working version of Programmatically adding a group name with the accessible name of radio buttons</a>. The <a href="../../working-examples/flash-grouped_form_controls/grouped_form_controls.zip">source of Programmatically adding a group name with the accessible name of radio buttons</a> is available.</p>
199199
<div class="note">
200-
<p>Adobe Flex allows you to perform this type of behavior by using the &lt;form&gt;, &lt;formitem&gt; and &lt;formheading&gt; elements </p>
200+
<p>Adobe Flex allows you to perform this type of behavior by using the <code>&lt;Form&gt;</code>, <code>&lt;FormItem&gt;</code>, and <code>&lt;FormHeading&gt;</code> elements</p>
201201
</div>
202202

203203
</section>

0 commit comments

Comments
 (0)