Skip to content

Add <meta name="responsive-embedded-sizing">#12444

Open
kojiishi wants to merge 1 commit into
whatwg:mainfrom
kojiishi:responsive-embedded-sizing
Open

Add <meta name="responsive-embedded-sizing">#12444
kojiishi wants to merge 1 commit into
whatwg:mainfrom
kojiishi:responsive-embedded-sizing

Conversation

@kojiishi

@kojiishi kojiishi commented May 13, 2026

Copy link
Copy Markdown

This adds <meta name="responsive-embedded-sizing"> as an immutable standardized name.

This is used by the CSS responsive embedded sizing flag.

(See WHATWG Working Mode: Changes for more details.)


/dom.html ( diff )
/infrastructure.html ( diff )
/semantics.html ( diff )

@kojiishi

Copy link
Copy Markdown
Author

@mtrootyy

Copy link
Copy Markdown

If either name, http-equiv, or itemprop is specified in meta element, then the content attribute must also be specified.
If "responsive-embedded-sizing" is specified to value of name attribute of mata element, what is specfied to value of content attribute of this meta element?

@miketaylr

Copy link
Copy Markdown
Member

https://html.spec.whatwg.org/#the-meta-element

If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified. Otherwise, it must be omitted.

But just below:

If a meta element has a name attribute, it sets document metadata.... If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.

So meta with name and without content is allowed (but, imho it's a bit confusing for HTML to use must in "this must be specified, otherwise it must not be specified" instead of may?)

@mtrootyy

mtrootyy commented May 18, 2026

Copy link
Copy Markdown

If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.

The above specifications are for user agents, not for authors.
Regardless of how the user agent processes it, author must comply with the following specifications.

If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified.

Comment thread source Outdated
@kojiishi

Copy link
Copy Markdown
Author

@annevk can you help whether the content attribute is required or not? It looks to me that omitting is allowed from what @miketaylr quoted, but I'm not sure.

@mtrootyy wrote:

If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.

The above specifications are for user agents, not for authors. Regardless of how the user agent processes it, author must comply with the following specifications.

If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified.

@kojiishi kojiishi force-pushed the responsive-embedded-sizing branch from 5d63e86 to ad98ae3 Compare May 28, 2026 08:51
Comment thread source Outdated
Comment thread source Outdated
Comment thread source Outdated
@kojiishi kojiishi force-pushed the responsive-embedded-sizing branch from ad98ae3 to 49c5445 Compare May 28, 2026 16:22
Comment thread source Outdated
@kojiishi kojiishi force-pushed the responsive-embedded-sizing branch 2 times, most recently from fe4fc74 to 615fb1c Compare May 28, 2026 17:34

@noamr noamr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Unofficial as I'm not an approver and we need multi implementer support)
I think this PR does the right thing in a way that's concise and consistent enough.
Editorially I can't say about maintaining the outdated wording style of existing meta tag or moving forward.

Comment thread source Outdated
<div algorithm>
<p>If a <code>meta</code> element is
<span data-x="node is inserted into a document">inserted into the document</span>,
the user agent must run the following algorithm:</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this wording style is outdated but will leave to @annevk whether this needs to be consistent with what's around it or with new style.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK I looked at other meta elements and you need to check for the name here. Are you ignoring the content? If so it's good to add a note.
Does changing the name attribute work? Is the matching case-sensitive?

Follow based on how other meta elements are speced.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks again, I read others and followed them. Can you check?

@noamr

noamr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@kojiishi the tests link points to existing tests in wpt.fyi that are not marked tentative.
Is there good coverage for adding/removing the meta tag dynamically before is seen?

@kojiishi

kojiishi commented Jun 3, 2026

Copy link
Copy Markdown
Author

@noamr

the tests link points to existing tests in wpt.fyi that are not marked tentative.

I removed .tentative because the template of this PR requested me to do so, there's a CSS WG resolution, and the resolution is put in the CSS spec. With this discussion, I will make sure the CSS spec is updated. Was that too early?

Is there good coverage for adding/removing the meta tag dynamically before is seen?

Yes, I think so, though they're based on the previous understanding of the "immutable" in the CSS WG. Among the wpt tests:

  • meta-in-body tests <meta> appearing in <body>.
  • meta-afterr-head tests <meta> in after-head insertion mode.
  • dynamic-append tests appending <meta>.
  • dynamic-remove tests removing <meta>.
  • dynamic-write tests document.write.
  • dynamic-name-change tests changing the name attribute.

I'll update/add tests and Blink once this discussion is settled down.

Comment thread source Outdated
Comment on lines +11508 to +11509
<dfn data-x="concept-document-responsive-embedded-sizing">responsive embedded sizing</dfn>,
initially false.</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<dfn data-x="concept-document-responsive-embedded-sizing">responsive embedded sizing</dfn>,
initially false.</p>
<dfn export data-x="concept-document-responsive-embedded-sizing">responsive embedded
sizing</dfn>, initially false.</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also perhaps add a note of where this is used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, thanks, and added a note.

Comment thread source Outdated
<div algorithm>
<p>If a <code>meta</code> element is
<span data-x="node is inserted into a document">inserted into the document</span>,
the user agent must run the following algorithm:</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK I looked at other meta elements and you need to check for the name here. Are you ignoring the content? If so it's good to add a note.
Does changing the name attribute work? Is the matching case-sensitive?

Follow based on how other meta elements are speced.

@noamr noamr self-requested a review June 3, 2026 13:00
This adds `<meta name="responsive-embedded-sizing">` as an immutable standardized name.

This is used by the CSS [responsive embedded sizing flag].

[responsive embedded sizing flag]: https://drafts.csswg.org/css-sizing-4/#document-responsive-embedded-sizing-flag
@kojiishi kojiishi force-pushed the responsive-embedded-sizing branch from 615fb1c to 6404dc1 Compare June 5, 2026 17:59
Comment thread source
to true.<p></li>
</ol>
</div>
</dd>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The following needs to be specified for authors:

If value of name attribute is specified an ASCII case-insensitive match for "responsive-embedded-sizing", the value of content attribute must be specified the empty string.

@noamr

noamr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

WHATNOT notes/minutes:

Responsive Iframe Meta Tag Proposal: Noam Rosenthal introduced a proposal (PR 12444) to add a meta tag for responsive embedded sizing, which serves as an opt-in for parents to resize iframes. Luke questioned if domain-specific opt-ins are necessary, but Simon Pieters noted that CSP frame ancestors already provide existing protections. The group discussed whether the meta tag provides sufficient control over cross-origin information access, with Noam Rosenthal comparing the functionality to an explicit post-message opt-in.

Responsive Iframe Data Leakage Concerns: The group discussed potential privacy risks, specifically whether responsive iframes could allow an origin to infer information about a user (e.g., whether they are logged into a site) based on size changes. Emilio Cobos Álvarez noted that the CSS working group previously discussed these risks and deemed them manageable if the parent page manages the sizing. Simon Pieters raised concerns regarding how to handle navigations and potential data leakage between pages.

Responsive Iframe Implementation and Documentation: Luke suggested that browsers should provide console warnings if an iframe opts into this feature without appropriate frame ancestor restrictions. Noam Rosenthal committed to updating the security explainer for the PR and consulting with Koji to ensure privacy concerns are addressed. Philip Jägenstedt clarified that fence frames, while still present in Chromium code, are not currently being actively developed.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants