Skip to content

Commit

Permalink
Fix link to Understanding Test Rules from techniques pages (#4075)
Browse files Browse the repository at this point in the history
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:

```
<a href="/understanding/understanding-act-rules.html">
```

Example of same link built in `publication` mode from this PR:

```
<a href="https://www.w3.org/WAI/WCAG22/Understanding/understanding-act-rules.html">
```
  • Loading branch information
kfranqueiro authored Sep 20, 2024
1 parent e4469d7 commit e679a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/test-rules.html
Original file line number Diff line number Diff line change
@@ -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 -%}
Expand Down

0 comments on commit e679a18

Please sign in to comment.