Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♿ Add title to amp-a4a iframe #28835

Merged
merged 2 commits into from Jun 24, 2020
Merged

♿ Add title to amp-a4a iframe #28835

merged 2 commits into from Jun 24, 2020

Conversation

andrewb
Copy link
Contributor

@andrewb andrewb commented Jun 11, 2020

This adds a title attribute to the AmpA4A generated iframe to improve accessibility. If a title attribute is set on amp-ad this will be used by the iframe. If no title is set, a fallback title of "3rd party ad content" is added.

This fixes the <frame> or <iframe> elements do not have a title issue flagged by Lighthouse.

Screen Shot 2020-06-11 at 12 46 09 PM

This will be applied to any ad type that extends AmpA4A, e.g. doubleclick (for example see http://localhost:8000/examples/ads.amp.html?type=doubleclick).

iframe title will fall back to "3rd party ad content"

<amp-ad type="doubleclick" ... ></amp-ad>

iframe title will be "Foo bar baz"

<amp-ad type="doubleclick" title="Foo bar baz" ... ></amp-ad>

@amp-bundle-size amp-bundle-size bot requested a review from rsimha June 12, 2020 21:49
Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the improvement

@kristoferbaxter
Copy link
Contributor

Restarted travis, and everything passes now with updated visual diff snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants