I'm not sure to be honest, I remember reading a tweet about how the text should describe only what can be seen in the image, and not additional information that the viewer might not know.
A quick google search led me to this site, in which case I guess code would be "complex information". Maybe a longdesc code pointing at the raw code would work?
Though I don't have any experience with screen readers or helping with accessibility for them, so I don't know how much the different solutions might help, or which ones exist.
That's a good site. I saw a Tweet last night from Jessica Rose asking about wanting information on writing good alt text. Marcy Sutton replied with some great information in this Tweet with links to a webinar about someone using a screen reader and their experience on the internet along with a decision tree for how to decide on what to put in alt text. It looks like some great info.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.