Skip to content

Conversation

ch-ncolley
Copy link

@ch-ncolley ch-ncolley commented Aug 28, 2025

I have coded this up but I understand there may be a reason why this proposal is not accepted or wanted so no hard feelings if it is not accepted 😄

At Companies House (https://find-and-update.company-information.service.gov.uk/) we do not use the OGL Licence:

The Companies House public register is not covered by the OGL. This information is made public under the Companies Act 2006

If we want to use the govukFooter Nunjucks macro we have to manually hide the OGL Licence by doing something like:

.ch-footer {
    .govuk-footer__licence-logo,
    .govuk-footer__licence-description {
        display: none;
    }
    .govuk-footer__meta-custom {
        margin-bottom: 0;
    }
}

or by maintaining our own Nunjucks macro, where we then dont benefit from any markup changes for example when the crown logo was added recently.

This pull request introduces:

  • a way to set contentLicence to false which then hides it.
  • additional CSS to remove the space below any meta links or custom meta information if there's no content licence information.
  • fixtures to visually check the above and to test the hiding behaviour
  • updates to the documentation to make note this parameter now accepts a boolean false value

Screenshots

Companies House example

GOV.UK footer with no OGL content licence and meta information lining up with crown logo correctly

{{ govukFooter({
  meta: {
    items: [
      {
        href: "http://resources.companieshouse.gov.uk/serviceInformation.shtml",
        text: "Policies"
      },
      {
        href: "/help/cookies",
        text: "Cookies"
      },
      {
        href: "https://www.gov.uk/government/organisations/companies-house#org-contacts",
        text: "Contact us",
        attributes: {
          target: "_blank"
        }
      },
      {
        href: "/help/accessibility-statement",
        text: "Accessibility statement"
      },
      {
        href: "https://developer.companieshouse.gov.uk/api/docs/",
        text: "Developers"
      }
    ],
    html: 'Built by <a class="govuk-footer__link" href="https://www.gov.uk/government/organisations/companies-house">Companies House</a>'
  },
  contentLicence: false
}) }}

GOV.UK Design System guidance

Before After
Screenshot of footer macro options showing Name: contentLicence. Type: object. Description: The content licence information within the footer component. Defaults to Open Government Licence v3 licence. See macro options for contentLicence Screenshot of footer macro options showing Name: contentLicence. Type: object or boolean. Description: The content licence information within the footer component. Is hidden when set to false. Defaults to Open Government Licence v3 licence. See macro options for contentLicence.

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Thanks for proposing this @NickColley. The technical changes look good and the review app seemed OK to me 🙌🏻

@hazalarpalikli @mia-allers-gds @CharlotteDowns any chance one of you could have a look at the Footer page of the preview app to confirm things look OK design-wise for the examples without licence, please?

@romaricpascal
Copy link
Member

Oh, we'll need a CHANGELOG entry for this new feature as well. Are you find drafting it @NickColley or would you prefer we add it before merging?

@NickColley
Copy link
Contributor

@romaricpascal I'll make sure to add the CHANGELOG entry good spot 👍🏻

ch-ncolley and others added 2 commits October 22, 2025 09:27
Since we can now hide the content licence entirely,
we need to handle the cases when a user may have
no content licence but some inline lists or custom meta info.

Co-authored-by:  Nick Colley <[email protected]>
@ch-ncolley ch-ncolley force-pushed the govuk-footer-remove-ogl-licence branch from 6069a8e to e7aeaa1 Compare October 22, 2025 08:29
@ch-ncolley ch-ncolley changed the title Proposal: Allow removal of Content Licence information in the GOV.UK footer component Allow removal of Content Licence information in the GOV.UK footer component Oct 22, 2025
ch-ncolley and others added 2 commits October 22, 2025 09:53
Co-authored-by:  Nick Colley <[email protected]>
@ch-ncolley
Copy link
Author

@romaricpascal added first draft of the CHANGELOG entry and commited your suggestion ready for final review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants