Links should support the `rel` attribute
iOvergaard opened this issue · 2 comments
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 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.
@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.