Skip to content

Commit 65692fd

Browse files
Forbid the British spellings fixed in recent PRs (mdn#45358)
* Forbid the British spellings fixed in recent PRs Adds the 29 British spellings corrected in mdn#44920, mdn#45333, mdn#45334, mdn#45340, mdn#45341, mdn#45346 and mdn#45355 to the forbidden-spelling dictionary, so `npm run lint:typos` fails on them instead of letting them back in. Both spellings are valid dictionary words, so nothing could catch a regression until now. Enforcing the list surfaced 32 occurrences that earlier passes missed: seven of "labelled" in prose in the WCAG and ARIA guides, and twenty-five in code comments and log strings that earlier passes had left alone as code. The comments and strings are prose and read the same either way, so they are corrected rather than exempted. Ten files keep a British spelling and carry a per-file `cSpell:ignore` comment, because changing the text would change its meaning: - Code identifiers: `const cancelled` on the DOM events page and `const maths` in the MathML tutorial. - The verbatim Firefox error strings on "functions cannot be labelled". - The `menu-labelled-open` example extension name, and the `colour` keys in the WebExtensions storage and i18n examples, which mirror the `favourite-colour` example repository and the en_GB message that example returns. - The note on the listbox role page stating that "labelled", with two L's, is the correct spelling per accessibility API conventions. - The "Million tonne punch" sample data, which is shared with the learning-area repository. - The screen reader transcript on the <math> element page. `grey` is deliberately left out. It is a valid CSS named color and appears legitimately 167 times, in `<named-color>`, the `tabGroups.color` enum, and SVG and CSS samples, so forbidding it would need an ignore comment on roughly fifty files that use the keyword correctly. * Add more * Add a comment * Minor fix --------- Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
1 parent cf880ca commit 65692fd

45 files changed

Lines changed: 106 additions & 41 deletions

File tree

Some content is hidden

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

.vscode/cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@
146146
"addWords": false,
147147
"noSuggest": true
148148
},
149+
// TODO: cSpell seems to match forbidden entries case-sensitively.
150+
// For now we just report all-lowercase instances.
151+
// https://github.com/streetsidesoftware/cspell/issues/9085
149152
{
150153
"name": "forbidden-spelling",
151154
"path": "./dictionaries/forbidden-spelling.txt",

.vscode/dictionaries/code-entities.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ ctrz
169169
Cubehelix
170170
currententrychange
171171
currentscreenchange
172+
customelementregistry
172173
cwrap
173174
daala
174175
dangi
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1+
!amongst
12
!anticlockwise
3+
!bevelled
4+
!bevelling
5+
!burnt
6+
!cancelled
7+
!cancelling
8+
!centre
9+
!centred
10+
!centres
11+
!centring
12+
!colour
13+
!coloured
14+
!fibre
15+
!fulfil
16+
!fulfils
17+
!greyed
18+
!greying
19+
!greyish
20+
!honour
21+
!honoured
22+
!honouring
23+
!honours
24+
!judgement
25+
!labelled
26+
!labelling
27+
!learnt
28+
!levelled
29+
!leveller
30+
!levelling
31+
!localising
32+
!maths
33+
!misspelt
34+
!modelled
35+
!modelling
36+
!programme
37+
!programmes
38+
!signalled
39+
!signalling
40+
!spelt
41+
!tonne
42+
!totalled
43+
!totalling
44+
!whilst

.vscode/dictionaries/terms-abbreviations.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ barcodes
6161
barebones
6262
bfcache
6363
BGRA
64-
Bignums
64+
bignum
65+
bignums
6566
bikeshedding
6667
bilevel
6768
bioinformatics
@@ -594,6 +595,7 @@ redisplaying
594595
refbox
595596
regionless
596597
reimplementation
598+
relatedly
597599
remarketing
598600
remotable
599601
renderable

files/en-us/learn_web_development/core/accessibility/wai-aria_basics/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ Always include a {{HTMLelement('label')}} for every input. While some screen rea
838838
> [!NOTE]
839839
> You can see the finished example live at [`form-validation-updated.html`](https://mdn.github.io/learning-area/accessibility/aria/form-validation-updated.html).
840840
841-
WAI-ARIA also enables some advanced form labelling techniques, beyond the classic {{htmlelement("label")}} element. We already talked about using the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label) property to provide a label where we don't want the label to be visible to sighted users (see the [Signposts/Landmarks](#signpostslandmarks) section, above). Some other labeling techniques use other properties such as [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby) if you want to designate a non-`<label>` element as a label or label multiple form inputs with the same label, and [`aria-describedby`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby), if you want to associate other information with a form input and have it read out as well. See [WebAIM's Advanced Form Labeling article](https://webaim.org/techniques/forms/advanced) for more details.
841+
WAI-ARIA also enables some advanced form labeling techniques, beyond the classic {{htmlelement("label")}} element. We already talked about using the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label) property to provide a label where we don't want the label to be visible to sighted users (see the [Signposts/Landmarks](#signpostslandmarks) section, above). Some other labeling techniques use other properties such as [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby) if you want to designate a non-`<label>` element as a label or label multiple form inputs with the same label, and [`aria-describedby`](/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby), if you want to associate other information with a form input and have it read out as well. See [WebAIM's Advanced Form Labeling article](https://webaim.org/techniques/forms/advanced) for more details.
842842

843843
There are many other useful properties and states too, for indicating the status of form elements. For example, `aria-disabled="true"` can be used to indicate that a form field is disabled. Many browsers will skip past disabled form fields which leads to them not being read out by screen readers. In some cases, a disabled element will be perceived, so it is a good idea to include this attribute to let the screen reader know that a disabled form control is in fact disabled.
844844

files/en-us/learn_web_development/core/scripting/json/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ As described above, JSON is a string whose format very much resembles JavaScript
4949
The following is a valid JSON string representing an object.
5050
Note that it is also a valid JavaScript object literal — just with some more [syntax restrictions](#json_syntax_restrictions).
5151

52+
<!-- cSpell:ignore tonne -->
53+
5254
```json
5355
{
5456
"squadName": "Super hero squad",

files/en-us/mozilla/add-ons/webextensions/api/menus/onshown/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ An extension can use this event to update its menu items using information that'
1212

1313
The handler can add, remove, or update menu items.
1414

15+
<!-- cSpell:ignore labelled -->
16+
1517
For example, the [menu-labelled-open](https://github.com/mdn/webextensions-examples/tree/main/menu-labelled-open) example extension adds a menu item that's shown when the user clicks a link, and that, when clicked, just opens the link. It uses `onShown` and `refresh()` to annotate the menu item with the hostname for the link, so the user can easily see where they will go before they click.
1618

1719
Note that an extension should not take too much time before calling `refresh()`, or the update will be noticeable to the user.

files/en-us/mozilla/add-ons/webextensions/api/omnibox/oninputcancelled/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The listener function is passed no parameters.
3333

3434
```js
3535
browser.omnibox.onInputCancelled.addListener(() => {
36-
console.log("The user cancelled the session.");
36+
console.log("The user canceled the session.");
3737
});
3838
```
3939

files/en-us/mozilla/add-ons/webextensions/api/storage/managed/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ For Firefox, you need to create a [JSON manifest (native manifest) file in a spe
1616

1717
Here's an example native manifest:
1818

19+
<!-- cSpell:ignore colour -->
20+
1921
```json
2022
{
2123
"name": "favourite-colour-examples@mozilla.org",

files/en-us/mozilla/add-ons/webextensions/internationalization/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ page-type: guide
55
sidebar: addonsidebar
66
---
77

8+
<!-- cSpell:ignore colour -->
9+
810
The [WebExtensions](/en-US/docs/Mozilla/Add-ons/WebExtensions) API has a rather handy module available for internationalizing extensions — [i18n](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/i18n). In this article we'll explore its features and provide a practical example of how it works.
911

1012
> [!NOTE]

0 commit comments

Comments
 (0)