From e679a18104607e9588e14708b5b0fd8c8b50b8fd Mon Sep 17 00:00:00 2001 From: "Kenneth G. Franqueiro" Date: Fri, 20 Sep 2024 14:35:25 +0000 Subject: [PATCH] Fix link to Understanding Test Rules from techniques pages (#4075) This bug specifically affects the link to "Understanding Test Rules for WCAG Success Criteria" found under Test Rules sections in techniques pages only (understanding pages do not have this bug). The link has the wrong base path, causing a 404 when built for GitHub Pages or the W3C site. This PR fixes it by properly referencing `understanding` relatively from pages under `techniques`; in the full scope of the build system, this then ends up replaced with a fully-qualified URL when processed through `CustomLiquid.ts`. Example from https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA4: ``` ``` Example of same link built in `publication` mode from this PR: ``` ``` --- _includes/test-rules.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/test-rules.html b/_includes/test-rules.html index 1d30ac01b4..c2842bf0df 100644 --- a/_includes/test-rules.html +++ b/_includes/test-rules.html @@ -1,6 +1,6 @@ {% if testRules.size > 0 %} {%- if isTechniques -%} - {% assign understandingActRulesHref = "/understanding/understanding-act-rules.html" %} + {% assign understandingActRulesHref = "../../understanding/understanding-act-rules.html" %} {%- else -%} {% assign understandingActRulesHref = "understanding-act-rules.html" %} {%- endif -%}