You can use block or inline raw LaTeX to create annotations with the pdfcomment package
(not the most reader-friendly manual in the world. You probably want to read the "Environments" and "Commands" parts before the "Options" part!)
You can also use a filter to wrap the text of a span or div with a certain class or attribute in the appropriate raw LaTeX. Basically you insert a raw latex element with `\pdfcomment[<options>]{` before the span content and one raw latex element with `}` after the content.