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

Add rel attribute to the Exit this Page button #4054

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Aug 7, 2023

Adds the rel="nofollow noreferrer" attribute to the Exit this Page button, so that the button:

  • Does not unduly endorse the external webpage in search rankings.
  • Does not provide a referrer header or information about the current browsing context to the external webpage, as this could be used by the target webpage to reveal information about the originating page.

Resolves #3921.

Changes

  • Adds { 'rel': 'nofollow noreferrer' } the attributes parameter of the govukButton macro.
  • Adds tests for the new default functionality.
  • Adds changelog entry.
    • Also tweaks the wording of some of the other 'suggested change' entries.

@querkmachine querkmachine self-assigned this Aug 7, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 7, 2023 11:48 Inactive
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from a70c083 to b06717c Compare August 7, 2023 12:00
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 7, 2023 12:01 Inactive
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from b06717c to 5b58e9d Compare August 7, 2023 12:12
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 7, 2023 12:12 Inactive
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from 5b58e9d to 73043ac Compare August 7, 2023 14:04
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 7, 2023 14:04 Inactive
@querkmachine querkmachine marked this pull request as ready for review August 7, 2023 14:14
@querkmachine querkmachine requested a review from a team August 7, 2023 14:14
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from 73043ac to 5ac679b Compare August 7, 2023 14:29
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 7, 2023 14:29 Inactive
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

One comment. Looking good.

I wonder if @claireashworth should sus out the changelog entry now or later. Claire, have you been reviewing other changelog entries for 5.0 before they get merged into main?

@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from 5ac679b to 047dd75 Compare August 9, 2023 09:14
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:15 Inactive
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from 047dd75 to ec24f0e Compare August 9, 2023 09:24
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:25 Inactive
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from ec24f0e to 363571b Compare August 9, 2023 09:25
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:25 Inactive
@querkmachine querkmachine changed the title Add attributes support to the Exit this Page button Add rel attribute to the Exit this Page button Aug 9, 2023
@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from 363571b to e752be0 Compare August 9, 2023 09:26
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:26 Inactive
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

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

One tiny minor thing

Although we often quote attributes keys like "data-attribute" so not a blocker

@querkmachine querkmachine force-pushed the exit-this-page-button-attributes branch from e752be0 to 1c7be24 Compare August 9, 2023 09:36
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:37 Inactive
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

We're looking good. One final thing I forgot in my previous review: could we also update the child maintenance and ETP with skiplink examples so that the secondary links on those pages include the rel improvement?

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4054 August 9, 2023 09:51 Inactive
@querkmachine
Copy link
Member Author

@owenatgov It is done!

One of the skiplinks was missing any text, too. Fixed that while I was at it. Ooerr.

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

💪🏻

@querkmachine querkmachine merged commit 02b5e05 into main Aug 9, 2023
41 checks passed
@querkmachine querkmachine deleted the exit-this-page-button-attributes branch August 9, 2023 10:06
colinrotherham pushed a commit that referenced this pull request Aug 22, 2023
Add `rel` attribute to the Exit this Page button
@romaricpascal romaricpascal mentioned this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Add rel=noreferrer to Exit this page link
6 participants