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
Copy file name to clipboardExpand all lines: 11ty/README.md
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,77 @@ Maintenance tasks (for working with Eleventy config and supporting files under t
28
28
-`npm run check` checks for TypeScript errors
29
29
-`npm run fmt` formats all TypeScript files
30
30
31
+
## Associated Techniques Data
32
+
33
+
Each success criterion's page contains a Techniques section which links to associated techniques.
34
+
These used to be defined directly in HTML in each respective page, but have since been relocated to
35
+
a single data file, `understanding/understanding.11tydata.js`, under the key `associatedTechniques`.
36
+
37
+
This field is typed, in order to provide some degree of autocomplete in IDEs that support TypeScript
38
+
(e.g. Visual Studio Code), as well as some amount of immediate feedback while editing.
39
+
Further validation is performed when running the build or dev server, to provide more focused error messages for common mistakes.
40
+
41
+
### Listing Techniques
42
+
43
+
Techniques may be indicated via an object as outlined below, or using a shorthand string.
44
+
Shorthand strings may function as either `id` or `title` seen below, and are
45
+
recommended for brevity when no `using` or `and` relationship is present.
46
+
47
+
The following list outlines properties available on each technique object:
48
+
49
+
-`id` - Technique ID
50
+
-`title` - Technique description (HTML flow content allowed), to define free-form entries that don't reference a specific technique
51
+
-`using` - Optional array of further techniques to be populated into a child list
52
+
- Child techniques may also include `using`
53
+
-`usingConjunction` - When `using` is specified, this overrides the word that appears before usingQuantity
54
+
- Default: `"using"`; HTML flow content allowed
55
+
-`usingQuantity` - When `using` is specified, this overrides the word that appears after `usingConjunction` and before "of the following techniques"
56
+
- Default: `"one"`
57
+
- May be empty string (`""`), in which case the subsequent "of" is dropped
58
+
-`usingPrefix` - Adds text to appear before `usingConjunction`
59
+
-`skipUsingPhrase` - Omits the entire "... using ... of the following techniques" phrase
60
+
- This is mainly an escape hatch for rare instances where a child list is used but no "using" phrase appears at all (e.g. in 1.4.4: Resize Text)
61
+
62
+
Typically, either `id` or `title` is required.
63
+
If `id` is specified, then `prefix` and/or `suffix` may also be specified (with HTML flow content allowed in each),
64
+
resulting in "{prefix} {linked technique title} {suffix}".
65
+
66
+
In extremely rare cases, `using` may be specified alone without either `id` or `title`,
67
+
e.g. for top-level "Using two or more of the following" in 2.4.5: Multiple Ways.
68
+
69
+
#### Conjunctions
70
+
71
+
To represent multiple parallel techniques, an `and` key may be specified instead of `id` or `title`. In this case, the following properties are supported:
72
+
73
+
-`and` - an array of technique objects or shorthand strings (as described above)
74
+
-`using` and its related fields (seen above) may optionally be specified alongside `and`
75
+
-`andConjunction` may optionally be specified alongside `and`,
76
+
to override the default `"<strong>AND</strong>"` phrasing (e.g. in 4.1.3: Status Messages)
77
+
- Techniques listed _within_`and` should be flat, never containing `and` or `using`
78
+
79
+
### Situations or Other Subsections (Sufficient only)
80
+
81
+
The top level of the `sufficient` array may consist entirely of either technique entries (see above)
82
+
or subsection entries. It should not contain a mix of both.
83
+
84
+
Subsections are typically used to define multiple "situations", where each title begins with "Situation A:", "Situation B:", etc.;
85
+
in rare cases it is used for other purposes, e.g. in 1.4.8: Visual Presentation.
86
+
87
+
Subsection entries contain the following:
88
+
89
+
-`title` (required, HTML allowed)
90
+
-`techniques` (required) - array of technique entries (see above)
91
+
-`note` (optional, HTML allowed) - content to appear in a Note at the end of the subsection (e.g. in 4.1.3: Status Messages)
92
+
-`groups` (optional) - array of objects with `id`, `title`, `techniques`; see more below
93
+
-`techniques` within `groups` are not expected to involve `and` or `using`
94
+
95
+
#### Groups within Situations
96
+
97
+
Most of the situations in 1.1.1: Non-text Content include groupings which start with a boldface paragraph (not a heading),
98
+
and are referenced one or more times within preceding "using" clauses.
99
+
Groups can be defined at the top level of each situation/section entry as mentioned above.
100
+
Defining `groups` automatically implies a "using" relationship, without explicitly defining `using` for each technique.
0 commit comments