Skip to content

Commit

Permalink
fix: add missing title in amp-consent iframe element (#39940)
Browse files Browse the repository at this point in the history
* fix: add missing title in amp-consent iframe element

* fix: improve default title
  • Loading branch information
honzalo authored Apr 2, 2024
1 parent 0eb1f65 commit 5e5106b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions extensions/amp-consent/0.1/amp-consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ 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);
Expand Down

0 comments on commit 5e5106b

Please sign in to comment.