I don't know you \whitespace and can't find any reference to it. And what kind of thing is this ? Anyway, I'm not sure where you mean it to be. My attempts were unsuccessfull.
\whitespace trim\define mymacro()
\whitespace trim
Macros def
\end[[<base>] [<wcagTechDict "$ref$">] [/$ref$] +[join[]]][<base>] [<wcagTechDict "$ref$">] [/$ref$] +[join[]]Also your filter seems broken[<base>] [<wcagTechDict "$ref$">] [/$ref$] +[join[]]
But what is [/$ref$]
@EricI don't understand the [[/$tref$]] construct inside a filter. From the doc, I see that [...] is a filter run. A filter run is made of step and each step is essentially a parameter eventually preceded by ! and/or an operator (with eventual : suffixes). No suare breacket within a step. I heve not read that a run can directly contain a run. So I cannot understand how [[/$ref]] may occur within a filter. I4m also finding strange a step without operator but with an operand (parameter) and the text seems to be ofg the same advice but as far as I read the railroad schema, this may very well happen (no idea of an example for me).I don't say you're wrong, I'm just saying I don't see how I could have understood that from the official documentation.
The step's operator is drawn from a list of predefined keywords, which can be extended by plugins.
Any unrecognised operator is treated as if it was the suffix to thefieldoperator.
If a step's operator is omitted altogether, it defaults totitle.
The lower three options in the diagram match syntax like
HelloThere,"HelloThere",'HelloThere'and"Filter Operators".
They are short for
[title[...]].The quoted options exist to support titles that contain square brackets, as in
"An [[[[Unusual]]]] Tiddler".
Thank you vet much ineed Eric! I already read that abbreviated form stuff, but it did not got me right on this. Actually, I think the shorter syntax is really difficult into apprehending the filters. For me anyway.

For example [[title[$ref$]] +join[]] has 2 syntax errors "[title[$ref$]join[]]" but [[$ref$]join[]] if it was logicalBut what are you joining? so I don't understand it logically.
\define makeURL(ref)
<$vars base="https://www.w3.org/WAI/WCAG21/Techniques/">
<$set name="url" filter="[<base>] [<macro1>] [[/]] [<macro2>] [[/$ref$]] +[join[]]">
<<url>>
</$set>
</$vars>
\end
<$wikify name="url" text=<<makeURL>>
...
</$wikify>
<$vars base="https://www.w3.org/WAI/WCAG21/Techniques/">
<$vars url={{{ [<base>] [<macro1>] [[/]] [<macro2>] [[/something]] +[join[]] }}}
...
</$vars>
</$vars>

At last, I've been able to find a solution! Here is the code, featuring a wikify widget to get the text of the transclusion available for buildig the url string.
<$wikify name="wcagDir" text="""<$transclude tiddler="$:/user/dict/wcag/ref/cat" index=<<codeFam>> />""" >
<$vars wcagDir={{{ [[$:/user/dict/wcag/ref/cat]getindex<codeFam>] }}}>