Would you be able to add a title attribute to the iframe the script generates to describe the content?
Inline frames (iframes) are used to insert content from other parts of the web.
A title that summarizes the visual content will help screen reader users to understand the iframe's purpose on the page.