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

Links should support the rel attribute #721

Closed
iOvergaard opened this issue Jan 23, 2024 · 2 comments · Fixed by #814
Closed

Links should support the rel attribute #721

iOvergaard opened this issue Jan 23, 2024 · 2 comments · Fixed by #814
Labels
community/up-for-grabs enhancement New feature or request good first issue Good for newcomers

Comments

@iOvergaard
Copy link
Contributor

It seems a stretch that all target=_blank links would require a rel=noreferrer attribute as they could be internal links and therefore you would lose tracking if you kept this on.

Consider adding this as a real property on all linkable elements instead, as there are a host of other values you can set in this field: rel-attribute on MDN

Originally posted by @iOvergaard in #715 (comment)

@iOvergaard iOvergaard added enhancement New feature or request good first issue Good for newcomers community/up-for-grabs labels Jan 23, 2024
@bjarnef
Copy link
Contributor

bjarnef commented Feb 5, 2024

@iOvergaard target=_blank requires rel=noopener, but for some older browsers which didn't supported noopener I think noreferrer was added as well.

However for modern browsers this is actually not needed anymore.
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/noopener

Note: Setting target="_blank" on elements implicitly provides the same rel behavior as setting rel="noopener" which does not set window.opener.

@iOvergaard
Copy link
Contributor Author

@bjarnef Yeah, I linked that in the original comment (must have forgotten to update this issue). We do not support older browsers, so that's why I'm saying we don't need to explicitly specify noopener. I would much rather we support setting a value for the rel attribute and people can put in whatever they want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community/up-for-grabs enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants