diff --git a/11ty/guidelines.ts b/11ty/guidelines.ts index 0dc8ace485..27cc3fd8ff 100644 --- a/11ty/guidelines.ts +++ b/11ty/guidelines.ts @@ -247,6 +247,15 @@ const loadRemoteGuidelines = async (version: WcagVersion) => { $("[role='note'] .marker").remove(); $("[role='note']").find("> div, > p").addClass("note").unwrap(); + // Convert data-plurals (present in publications) to data-lt + $("dfn[data-plurals]").each((_, el) => { + el.attribs["data-lt"] = (el.attribs["data-lt"] || "") + .split("|") + .concat(el.attribs["data-plurals"].split("|")) + .join("|"); + delete el.attribs["data-plurals"]; + }); + // Un-process bibliography references, to be processed by CustomLiquid $("cite:has(a.bibref:only-child)").each((_, el) => { const $el = $(el); @@ -255,7 +264,7 @@ const loadRemoteGuidelines = async (version: WcagVersion) => { // Remove generated IDs and markers from examples $(".example[id]").removeAttr("id"); - $(".example .marker:has(.self-link)").remove(); + $(".example > .marker").remove(); // Remove extra markup from headings so they can be parsed for names $("bdi").remove(); diff --git a/package.json b/package.json index f9b0601f58..78f8d48293 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "tsx node_modules/@11ty/eleventy/cmd.cjs --config=eleventy.config.ts", "check": "tsc", "fmt": "prettier . -w", - "publish-w3c": "WCAG_MODE=publication npm run build && tsx 11ty/cp-cvs.ts", + "publish-w3c": "WCAG_VERSION=22 WCAG_MODE=publication npm run build && tsx 11ty/cp-cvs.ts", "publish-w3c:21": "WCAG_VERSION=21 WCAG_MODE=publication npm run build && WCAG_VERSION=21 tsx 11ty/cp-cvs.ts", "start": "tsx watch node_modules/@11ty/eleventy/cmd.cjs --config=eleventy.config.ts --serve --incremental" },