Affiliate links - consistent rel attribute#15976
Merged
Merged
Conversation
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
arelra
reviewed
May 26, 2026
| */ | ||
| rel: isSkimlink(href) | ||
| ? 'sponsored' | ||
| ? 'sponsored noreferrer noopener' |
Member
There was a problem hiding this comment.
What do you think about a single utility function that provides this value so it is not duplicated e.g.
Suggested change
| ? 'sponsored noreferrer noopener' | |
| ? getSkimLinkRel() |
Contributor
Author
There was a problem hiding this comment.
Good idea, any reason for it to be a function rather than a const?
charleycampbell
approved these changes
May 27, 2026
Contributor
charleycampbell
left a comment
There was a problem hiding this comment.
Looks good to me 👍
|
Overdue on PROD (merged by @andrewHEguardian 30 minutes and 8 seconds ago) What's gone wrong? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Updates all affiliate (skimlinks) links to use the attribute
rel="sponsored noopener noreferer". We already use this value on the product link button.Why?
We are testing this exact value in our e2e tests assuming we'll find a product link button. This caused a failure when the article was updated to include a skimlink in the opening body text. Making this consistent means the tests don't have to rely on the order in which the links might appear, and is correct as we should be applying the same attributes to all skimlinks.
Screenshots