One solution I was thinking of since the original Object Links FEP appeared regarding this was to match the a
element by the Link’s href and walking it’s parent elements until one has a textContent matching the name of the object link.
This seems like it would match quite a few use cases (crucially, both in cases where Link.name == a
.textContent and in cases where there are surrounding decorations like the RE:
prefix), and the only thing it’d require out of producers would be to wrap the text in any HTML element (even a plain span
without any classes would do)
My main concern about this is I’m unsure about how many HTML tooling actually supports computing textContent
.