By my understanding (as a sighted person who has relatively zero experience using such features) alt text is for short pieces of text that might aid in communication of an image to a blind person. I have even less understanding on whether or not dumping a chunk of code in there would be at all useful, and I expect very few sighted persons would know better. Hence my complaint, and hence my question.
"The alt text should be the most concise description possible of the image’s purpose. If anything more than a short phrase or sentence is needed, it would be better to use one of the long description methods discussed in complex images."
The alternatives for long descriptions are the "longdesc" attribute, "figure" with "figcaption" tag or the "aria-describedby".