Skip to content

Comments

Add sitemap#2544

Merged
thomasiles merged 7 commits intomainfrom
add-sitemap
Feb 16, 2026
Merged

Add sitemap#2544
thomasiles merged 7 commits intomainfrom
add-sitemap

Conversation

@thomasiles
Copy link
Contributor

@thomasiles thomasiles commented Feb 6, 2026

Add a sitemap with links to each page

Trello card: https://trello.com/c/sdUWJCNl/2739-users-list-page-can-only-be-accessed-from-the-header-navigation

Add a sitemap, linked from the footer with links to each significant page.

I've used headers because we needed some to be links. Lists have extra spacing to make them easier to use with touch.

image image
  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Copy link
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

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

I've pushed a couple of changes:

  • I've removed the MOU link for non-super admins based on a conversation on the Trello card
  • I've some extra text that I don't think was included intentionally

Looks like a sensible approach overall, and all works for me locally.

@thomasiles
Copy link
Contributor Author

I've pushed a couple of changes:

  • I've removed the MOU link for non-super admins based on a conversation on the Trello card
  • I've some extra text that I don't think was included intentionally

Looks like a sensible approach overall, and all works for me locally.

Amazing, thank you!

thomasiles and others added 7 commits February 16, 2026 10:33
The Group model uses the attribute `external_id` to generate links instead of the
id. The external_id is set using a before_create callback.

The factory doesn't set the external_id. The callback
is only triggered when the create strategy is used. Tests which call
code that contains helpers like `link_to` need to use `create`. If they
use `build_stubbed`, which is faster, the external_id will be not be set
and an error will be raised.

Adding external_id to the factory lets tests use `build_stubbed` when
they don't need to test the database.

This will make the tests run faster.
We link our accessibility statement, cookies, privacy, and terms of use
pages to the product pages in the footer.

These links are currently hard-coded in the application layout.

To use these links in other places, such as the sitemap, we define them
in the routes file.

This makes them more obvious and easier to change.

They currently all link directly to the production site.
We could change them to use a setting which takes the URL of the product
site.

That requires changes to the deploy repo, so I think it's best to do it
in another PR.
Some pages, such as the Users page, only have one link to access them.

This was identified as an issue in the accessibility audit.

This commit adds the view for a sitemap, which links to each page in the
app.
We add the route and controller for the sitemap view.
Add a link to the sitemap in the footer of the application.
Initially this was set to show an MOU link to any user who aren't able to see the list of MOU signatures (i.e. standard users and org admins).

We have decided not to show them this link - the MOU page includes a form to sign the MOU, and we're concerned that linking to this directly from the sitemap would result in unwanted MOU signatures. Additionally, since we don't currently have another way for non super admins to access this page, adding a link here would likely violate WCAG  SC 2.4.5: Multiple Ways.

Instead, we won't show any MOU information to non super admins. In future we might make a non-signable version of the MOU page visible to users on this page, but that will be a separate bit of work.
Some error text had been included in the view, presumably copied and pasted by accident. This commit removes it.
@sonarqubecloud
Copy link

@github-actions
Copy link

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2544.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@thomasiles thomasiles added this pull request to the merge queue Feb 16, 2026
Merged via the queue into main with commit 2e17c94 Feb 16, 2026
6 checks passed
@thomasiles thomasiles deleted the add-sitemap branch February 16, 2026 11:13
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.

2 participants