Problem/motivation

The core markup for media oEmbed items omits the <title> tag from the page, resulting in an iFrame document that is an HTML page without a <title> tag.

This module can derive the title of the oembed item using the same methodology it uses for inserting the title attribute into the iframe tag itself.

Proposed new markup of media oembed template:

{% set title = resource.getTitle() ?? ("Embedded content from " ~ resource.getProvider().getName()) %}
<!DOCTYPE html>
<html>
  <title>{{ title|t }}</title>
  <head>
    <css-placeholder token="{{ placeholder_token }}">
  </head>
  <body style="margin: 0">
    {{ media|raw }}
  </body>
</html>
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mark_fullmer created an issue. See original summary.

mark_fullmer’s picture

Title: Support title attribute in media oembed markup » Support title tag in media oembed markup
mark_fullmer’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.