Skip to content

Commit

Permalink
2.1 support: Avoid linking to future-version-only techniques
Browse files Browse the repository at this point in the history
  • Loading branch information
kfranqueiro committed Aug 7, 2024
1 parent 2964d9e commit dc04439
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions eleventy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,21 @@ export default function (eleventyConfig: any) {
}
return;
}
// Same for techniques only introduced in later WCAG versions
if (
technique.id in futureExclusiveTechniqueAssociations &&
!futureExclusiveTechniqueAssociations[this.page.fileSlug] &&
(!allFlatGuidelines[this.page.fileSlug] ||
allFlatGuidelines[this.page.fileSlug].version <= version)
) {
if (process.env.WCAG_VERBOSE) {
console.warn(
`linkTechniques in ${this.page.inputPath}: ` +
`skipping future-version technique ${id}`
);
}
return;
}

// Support relative technique links from other techniques or from techniques/index.html,
// otherwise path-absolute when cross-linked from understanding/*
Expand Down

0 comments on commit dc04439

Please sign in to comment.