Summary
Add a standalone glossary to the WAI ACT Rules area, comparable to the glossary on the former ACT Rules community site: a single place with all definitions, stable fragment IDs for deep linking, correct internal links, and for each term a list of rules that use that definition.
This is an additional resource. It must not replace or remove the existing Glossary section on individual rule pages (those stay so each rule remains self-contained).
Reference implementation (former public site)
The behaviour to match comes from the Gatsby site in act-rules-web. Useful pointers:
- Glossary page: renders full glossary markdown as HTML, one block per term with
id = glossary key, plus a “Used In Rules” list per term (see act-rules-web/src/pages/glossary.js).
- Reverse index:
_data/glossary-usages.json, generated by build/create-glossary-usages.js from rule + glossary markdown (rule id → list of #key references, including transitive references via links inside glossary entries).
- Per-rule glossary in Gatsby:
act-rules-web/src/components/glossary.js shows only the terms relevant to that rule, but still uses full rendered HTML for each term.
Full definition content vs what appears in WAI rule files today
act-tools (used when generating content/rules/*/proposed.md for WAI) truncates inlined glossary bodies: it keeps only content before the first ## heading in each glossary source file (see get-glossary.ts / getDefinitionBody in act-tools). Anything after that—e.g. Examples, extra sections—is omitted from the glossary block on the rule page.
Requirement for this issue: the standalone WAI glossary must show the complete definition from source (including everything after the first ##), not the act-tools truncation used for per-rule embeds.
Scope and non-goals
- In scope: New glossary index (and/or per-term pages), navigation entry, working anchors and links on WAI, “used in rules” lists with correct WAI rule URLs, full definition bodies as above.
- Explicit non-goal: Do not remove or replace the existing per-rule Glossary section in published rules. Optional future work (separate decision): whether to add more cross-links from rules to the global glossary; that does not change keeping the inline glossary.
Implementation notes (suggestions)
-
Content source today is still the CG repo: act-rules.github.io → pages/glossary/*.md. Publishing a full glossary on WAI may require extending act-tools and/or the wai-build workflow so glossary output is written into wcag-act-rules with appropriate frontmatter and permalinks—or an agreed alternative if authoring moves.
-
“Used in rules”: Reuse the same idea as act-rules-web’s create-glossary-usages.js: build-time map from rule → glossary #key (direct + transitive where applicable), then invert for display. Rule links must use WAI paths (e.g. /standards-guidelines/act/rules/{id}/proposed/), not Gatsby’s /rules/{id}.
-
Jekyll: _config.yml already declares a collection wai-wcag-act-rules-patterns titled “Glossary” but without content; that may be a hook, or use another pattern consistent with WAI theme requirements. Confirm any main WAI site config sync if your deployment requires it.
-
Link hygiene: Replace or avoid depending on https://act-rules.github.io/... for primary navigation where WAI URLs exist; fix remaining references in glossary-related content as needed.
-
Edge cases: Rules use non-glossary anchors (e.g. #ruleid:hidden); reverse-index logic should only count keys that correspond to real glossary entries. Glossary pages may define extra <dfn id="..."> sub-ids; the primary key in frontmatter remains the main stable id unless you document otherwise.
Acceptance criteria
Related repositories
Summary
Add a standalone glossary to the WAI ACT Rules area, comparable to the glossary on the former ACT Rules community site: a single place with all definitions, stable fragment IDs for deep linking, correct internal links, and for each term a list of rules that use that definition.
This is an additional resource. It must not replace or remove the existing Glossary section on individual rule pages (those stay so each rule remains self-contained).
Reference implementation (former public site)
The behaviour to match comes from the Gatsby site in
act-rules-web. Useful pointers:id= glossarykey, plus a “Used In Rules” list per term (seeact-rules-web/src/pages/glossary.js)._data/glossary-usages.json, generated bybuild/create-glossary-usages.jsfrom rule + glossary markdown (rule id → list of#keyreferences, including transitive references via links inside glossary entries).act-rules-web/src/components/glossary.jsshows only the terms relevant to that rule, but still uses full rendered HTML for each term.Full definition content vs what appears in WAI rule files today
act-tools (used when generating
content/rules/*/proposed.mdfor WAI) truncates inlined glossary bodies: it keeps only content before the first##heading in each glossary source file (seeget-glossary.ts/getDefinitionBodyin act-tools). Anything after that—e.g. Examples, extra sections—is omitted from the glossary block on the rule page.Requirement for this issue: the standalone WAI glossary must show the complete definition from source (including everything after the first
##), not the act-tools truncation used for per-rule embeds.Scope and non-goals
Implementation notes (suggestions)
Content source today is still the CG repo:
act-rules.github.io→pages/glossary/*.md. Publishing a full glossary on WAI may require extending act-tools and/or the wai-build workflow so glossary output is written intowcag-act-ruleswith appropriate frontmatter and permalinks—or an agreed alternative if authoring moves.“Used in rules”: Reuse the same idea as
act-rules-web’screate-glossary-usages.js: build-time map from rule → glossary#key(direct + transitive where applicable), then invert for display. Rule links must use WAI paths (e.g./standards-guidelines/act/rules/{id}/proposed/), not Gatsby’s/rules/{id}.Jekyll:
_config.ymlalready declares a collectionwai-wcag-act-rules-patternstitled “Glossary” but without content; that may be a hook, or use another pattern consistent with WAI theme requirements. Confirm any main WAI site config sync if your deployment requires it.Link hygiene: Replace or avoid depending on
https://act-rules.github.io/...for primary navigation where WAI URLs exist; fix remaining references in glossary-related content as needed.Edge cases: Rules use non-glossary anchors (e.g.
#ruleid:hidden); reverse-index logic should only count keys that correspond to real glossary entries. Glossary pages may define extra<dfn id="...">sub-ids; the primarykeyin frontmatter remains the main stable id unless you document otherwise.Acceptance criteria
#key(or equivalent) anchors.Related repositories
--glossaryDir,get-glossarytruncation)wai-build, testsglossary-usagesgeneration