Replies: 3 comments 2 replies
-
Lighthouse is accurately reporting an iframe without a title. In the future it may be possible to filter by 3P elements #13668, but ultimately there is still content on the page missing accessibility features. You are welcome to raise this as an issue to adsense. |
Beta Was this translation helpful? Give feedback.
2 replies
-
that happened to me too, I need to fix it https://www.computer-pdf.com/ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Kind of a bandaid fix but I implemented the following to fix it <script defer>
window.addEventListener("DOMContentLoaded", function() {
try {
var iframes = document.querySelectorAll(
'iframe[src*="https://googleads.g.doubleclick.net"], iframe[data-google-container-id]'
);
iframes.forEach(function(iframe) {
iframe.setAttribute("title", "google ads");
iframe.setAttribute("role", "banner");
if (iframe.hasAttribute("data-google-container-id") && iframe.complete) {
setAttributes(iframe);
} else {
iframe.addEventListener("load", function() {
setAttributes(iframe);
});
}
});
function setAttributes(iframe) {
var containerId = iframe.getAttribute("data-google-container-id");
iframe.setAttribute("title", "google ads");
iframe.setAttribute("role", "banner");
}
} catch (error) {
// Handle any errors that occur during the execution of the code
console.error("An error occurred:", error);
}
});
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am getting a couple error below that I think are coming from the adsense ad I got...
^^^
The code I have for it is just a copy and paste from adsense... and I don't see where to add a title...
import { useEffect } from "react";
Granted I also have a YouTube Iframe but that one has a title...
the url would be this one...
https://www.tu.biz/blog/english/pressure-compensated-pump-control-adjustment
pretty much every page with the adsense ad has the same error..
Beta Was this translation helpful? Give feedback.
All reactions