Closed yatil closed 5 months ago
how does changing the classname help? is there a script somewhere that naively grabs whatever the classname is and generates the text? /cc @iadawn
@patrickhlauke I think that is what this section of the XSLT does, but I’m no XSLT expert.
https://github.com/w3c/wcag/blob/ba81e62b839c64fb3789dff714934c514514eec0/xslt/base.xslt#L192-L212
Reading it again, it looks like the script inserts $guidelines.version
which is probably defined elsewhere…
And that elsewhere is here:
https://github.com/w3c/wcag/blob/ba81e62b839c64fb3789dff714934c514514eec0/build.xml#L13
I have no idea if changing this to 2.2 breaks everything or not. But suffice to say, my PR probably doesn’t work and I’ll close it.
Looks from my limited local testing that changing the version in the build.xml also does not break things, so I’ve reopened the PR. I apologize for the back and forth, last time when I tried building it, it just exploded in my face. 😂
i'd caution that the build pipeline may be using that $guidelines.version
to determine the final URL, i.e. https://www.w3.org/TR/WCAG22/ ... but @iadawn will hopefully know best
worst/simplest case, can probably set up a new variable for "human readable" version number and use that
Yeah, I don’t expect this to be merged as is, the house of cards that is the WCAG build process is too fragile for that. In the same time, I’d like to not add additional variables that might then not be updated accidentally.
Changing the value of guidelines.version
in build.xml
is likely to have many ripple effects. Moreover, there is already another variable that does what you want:
https://github.com/w3c/wcag/blob/ba81e62b839c64fb3789dff714934c514514eec0/xslt/base.xslt#L11
Changing this line...
https://github.com/w3c/wcag/blob/ba81e62b839c64fb3789dff714934c514514eec0/xslt/base.xslt#L206
...to reference guidelines.version.decimal
instead should do what you want, with no other changes necessary.
FWIW, this will also be fixed in the new Eleventy-based build process in #3917.
I wasn’t aware of an Eleventy build process being in development, @kfranqueiro. (I hope the Jekyll templates can be reused.) I don’t think it’s worth working on this for now.
Changing the class from wcag22 to wcag2.2 should fix the mentions of non-existing WCAG version 22 throughout the WCAG Understanding Documents.
Example: https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html
The text says:
This fix should change it to “New in WCAG 2.2”.