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

Improve conformance requirements on <link> attributes #9031

Open
domenic opened this issue Mar 16, 2023 · 0 comments
Open

Improve conformance requirements on <link> attributes #9031

domenic opened this issue Mar 16, 2023 · 0 comments

Comments

@domenic
Copy link
Member

domenic commented Mar 16, 2023

Now that we have processing models defined for all the <link> types, which are clear about which attributes are used, it might be a good idea to add conformance requirements on:

  • crossorigin=""
  • integrity=""
  • referrerpolicy=""
  • fetchpriority=""

From what I can tell, these all apply if and only if the type is one of: manifest, icon, modulepreload, stylesheet, prefetch, or preload, except crossorigin="" can also apply to preconnect.

Right now we have weak or incorrect conformance requirements:

The crossorigin attribute is a CORS settings attribute. It is intended for use with external resource links.

The integrity attribute [...] must only be specified on link elements that have a rel attribute that contains the stylesheet, preload, or modulepreload keyword.

The referrerpolicy attribute is a referrer policy attribute. It is intended for use with external resource links.

I think we should probably do something like: define "fetched external resource links" as manifest, icon, modulepreload, stylesheet, prefetch, or preload, and change all of these to require that they are used only on "fetched external resource links", or in the case of crossorigin="", fetched external resource links + preconnect.

/cc @noamr

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

No branches or pull requests

1 participant