From c87161d85b53a3e1f2ad1932d004ae78db7cfe99 Mon Sep 17 00:00:00 2001 From: "Kenneth G. Franqueiro" Date: Thu, 31 Jul 2025 10:46:55 -0400 Subject: [PATCH 1/2] Add missing meta charset and remove editors stylesheet at build time --- 11ty/CustomLiquid.ts | 8 ++++++-- techniques/technique-template.html | 3 ++- understanding/understanding-template.html | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/11ty/CustomLiquid.ts b/11ty/CustomLiquid.ts index f6a454b7e1..4d0c20541d 100644 --- a/11ty/CustomLiquid.ts +++ b/11ty/CustomLiquid.ts @@ -138,9 +138,10 @@ export class CustomLiquid extends Liquid { // Clean out elements to be removed // (e.g. editors.css & sources.css, and leftover template paragraphs) - // NOTE: some paragraphs with the "instructions" class actually have custom content, + // Note 1: some paragraphs with the "instructions" class actually have custom content, // but for now this remains consistent with the XSLT process by stripping all of them. - $(".remove, section#meta, section.meta").remove(); + // Note 2: the link selector accounts for ~40 files forgetting class="remove" on editors.css + $(".remove, link[href$='editors.css'], section#meta, section.meta").remove(); if ($("p.instructions").length > 0) { console.error(`${filepath} contains a

element.\n` + @@ -151,6 +152,9 @@ export class CustomLiquid extends Liquid { throw new Error("Instructions paragraph found; please resolve.") } + // Add charset to pages that forgot it + if (!$("meta[charset]").length) $('').prependTo("head"); + const prependedIncludes = ["header"]; const appendedIncludes = ["wai-site-footer", "site-footer"]; diff --git a/techniques/technique-template.html b/techniques/technique-template.html index cecf0531f6..04650770e1 100644 --- a/techniques/technique-template.html +++ b/techniques/technique-template.html @@ -1,8 +1,9 @@ + Technique Title - +

Technique Title

diff --git a/understanding/understanding-template.html b/understanding/understanding-template.html index 1ba3f8311a..20de0d3fb0 100644 --- a/understanding/understanding-template.html +++ b/understanding/understanding-template.html @@ -1,8 +1,9 @@ + WCAG 2 Understanding Page - +

Understanding SC #.#.#

From 0195ab2518b30a80bc81801a47681db549756754 Mon Sep 17 00:00:00 2001 From: "Kenneth G. Franqueiro" Date: Thu, 31 Jul 2025 10:57:04 -0400 Subject: [PATCH 2/2] Update CustomLiquid notes, since the previous note is no longer relevant --- 11ty/CustomLiquid.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/11ty/CustomLiquid.ts b/11ty/CustomLiquid.ts index 4d0c20541d..125f5659cb 100644 --- a/11ty/CustomLiquid.ts +++ b/11ty/CustomLiquid.ts @@ -138,9 +138,7 @@ export class CustomLiquid extends Liquid { // Clean out elements to be removed // (e.g. editors.css & sources.css, and leftover template paragraphs) - // Note 1: some paragraphs with the "instructions" class actually have custom content, - // but for now this remains consistent with the XSLT process by stripping all of them. - // Note 2: the link selector accounts for ~40 files forgetting class="remove" on editors.css + // Note: the link selector accounts for ~40 files forgetting class="remove" on editors.css $(".remove, link[href$='editors.css'], section#meta, section.meta").remove(); if ($("p.instructions").length > 0) {