How to add a title tag to the iframe embed script?

Is there a way to add a title tag to the iframe embed script?

I tried adding a title tag to the below, didnt work

<script src="https://subdomain.example.com/javascripts/embed-topics.js" title="title for the iframe" defer></script>

I ask because you get a red flag under Accessibility ( lighthouse)

Edit: Title tags are generally not required, but they are for <iframe> , due to screen readers

Any help is appreciated

Edit 2

Seems I’ll need to edit the /javascripts/embed-topics.js or more specifically, the below

var iframe=document.createElement("iframe");iframe.src=url+"/embed/topics?"+params.join("&");iframe.id=frameId;iframe.frameBorder=0;iframe.scrolling="no";list.appendChild(iframe);}});})();

Is this something thats possible?

Edit 3

Any insight here guys/gals/x?

I also noticed this is marked as “Serious” when it comes to the test on https://www.webpagetest.org/

(Google recommended testing tool)

3 Likes