Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion 11ty/guidelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "npm run build -- --serve --incremental"
},
Expand Down