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

Back links and breadcrumbs tweaks #1002

Merged
merged 24 commits into from
Sep 10, 2024
Merged

Conversation

anandamaryon1
Copy link
Collaborator

Description

Brings together the Back link (#964) and Breadcrumbs (#974) PRs and:

  • adds some slight tweaks to spacing, to make the back link and breadcrumbs the same height
  • removes text underline on breadcrumb responsive back link, to match back link styles

Checklist

frankieroberto and others added 17 commits June 10, 2024 21:36
The back link should be added to the template at the start of the `<div class="nhsuk-width-container">` container but before the `<main>` container. This is to ensure that it gets skipped over when using the "skip to main content" link.

However currently the back link by default will appear too close to the header and too far away from the h1. This adjusts the spacing to add some spacing before the back link, but no spacing after it (as the `<main>` element already add enough vertical spacing at the top using padding).
The back link should appear before the `<main>` element. Also added an example `<h1>` within the `<main>` element to more clearly illustration the relationship between the 2 elements.
Currently in the examples there’s a `breadcrumb` block which is outside the `<div class="nhsuk-width-container">`, in a similar way to the `beforeContent` block in the template in the NHS design system.

This moves the breadcrumb into `<div class="nhsuk-width-container">`, but before `<main class="nhsuk-main-wrapper" id="maincontent">`, by defining a `outerContent` which matches the existing NHS design system template.
This is no longer needed if the breadcrumb component itself is already inside the nhs-width-container.
This is for consistency with the Back link component.
anandamaryon1 and others added 2 commits August 28, 2024 14:04
This brings us into alignment with GOV.UK Frontend naming conventions.

The named `outerContent` block would no longer be needed.
roshaanbajwa and others added 2 commits August 29, 2024 10:21
This saves having to re-define the `<main>` element and demonstrates use of the `beforeContent` block.
@frankieroberto
Copy link
Contributor

@roshaanbajwa sorry, would you mind updating the reference images again? I've switched the examples to use the page.njk template instead of layout.njk, to avoid having to redefine <main> etc.

@edwardhorsford
Copy link
Contributor

This would be a breaking change, yeah?

@frankieroberto
Copy link
Contributor

@edwardhorsford I think so! There's a few other breaking changes proposed, eg #1000 so maybe they can all go out together?

@edwardhorsford edwardhorsford added this to the acr milestone Sep 4, 2024
@anandamaryon1 anandamaryon1 merged commit 82f3e8a into main Sep 10, 2024
2 checks passed
@anandamaryon1 anandamaryon1 deleted the back-links-and-breadcrumbs branch September 10, 2024 08:06
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.

5 participants