diff --git a/extensions/amp-consent/0.1/amp-consent.js b/extensions/amp-consent/0.1/amp-consent.js index bdef57d8e1f4..e0fbccc9d8e9 100644 --- a/extensions/amp-consent/0.1/amp-consent.js +++ b/extensions/amp-consent/0.1/amp-consent.js @@ -1035,7 +1035,6 @@ export class AmpConsent extends AMP.BaseElement { // Set up the __tcfApiLocator window to signal postMessage support const iframe = this.element.ownerDocument.createElement('iframe'); - iframe.setAttribute('title', this.element.title || 'Consent Banner'); iframe.setAttribute('name', TCF_API_LOCATOR); iframe.setAttribute('aria-hidden', 'true'); toggle(iframe, false); diff --git a/extensions/amp-consent/0.1/consent-ui.js b/extensions/amp-consent/0.1/consent-ui.js index c8bbe2446542..cac21db7e218 100644 --- a/extensions/amp-consent/0.1/consent-ui.js +++ b/extensions/amp-consent/0.1/consent-ui.js @@ -472,6 +472,7 @@ export class ConsentUI { createPromptIframe_(promptUISrc) { const iframe = this.parent_.ownerDocument.createElement('iframe'); const sandbox = this.getSandboxAttribute_(promptUISrc); + iframe.setAttribute('title', this.parent_.title || 'Consent Banner'); iframe.setAttribute('sandbox', sandbox); iframe.setAttribute('allow', IFRAME_ALLOWED_PERMISSIONS.join('; ')); const {classList} = iframe;