Skip to content

Commit dfffe22

Browse files
Merge pull request #2468 from nhsuk/card-guidance-updates
Card guidance updates
2 parents 1c617d6 + 907d726 commit dfffe22

39 files changed

Lines changed: 424 additions & 262 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# NHS digital service manual Changelog
22

3+
## 8.9.0 - 2 April 2026
4+
5+
:new: **New features**
6+
7+
- Update card component guidance to make it clearer
8+
- Add section on actions in cards
9+
- Split out use of cards for navigation into new hub page pattern
10+
- Update NHS App greeting section in Writing NHS messages
11+
- Add section on using autocomplete attribute to date input
12+
13+
:wrench: **Maintenance**
14+
15+
- Remove care card page from components and redirect to care card pattern
16+
317
## 8.8.0 - 19 March 2026
418

519
:new: **New features**
@@ -10,9 +24,8 @@
1024

1125
:wrench: **Maintenance**
1226

13-
- Port Nunjucks syntax highlighting from GOV.UK Design System
27+
- Port Nunjucks syntax highlighting from GOV.UK design system
1428
- Support focus and keyboard left/right scrolling on code blocks
15-
- Split out hub page pattern from card component and updated content
1629

1730
## 8.7.2 - 2 March 2026
1831

app.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ app.set('view engine', 'njk')
119119
// Nunjucks configuration
120120
const env = nunjucks.configure(config.nunjucksPaths, {
121121
express: app,
122-
noCache: true,
122+
lstripBlocks: true, // Remove leading spaces from a block/tag
123+
trimBlocks: true, // Remove trailing newlines from a block/tag
123124
watch: true
124125
})
125126

@@ -277,6 +278,14 @@ app.get('/design-example/components/checkboxes/hint', (req, res) => {
277278
res.redirect('/design-example/components/checkboxes/hint-text')
278279
})
279280

281+
// Redirects for design system components
282+
283+
app.get('/design-system/components/care-cards', (req, res) => {
284+
res.redirect(
285+
'/design-system/patterns/help-users-decide-when-and-where-to-get-care'
286+
)
287+
})
288+
280289
// Redirects for design system patterns
281290

282291
app.get(

app/views/accessibility-statement.njk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{% extends "layouts/app-layout-two-thirds.njk" %}
22

33
{% set pageTitle = "Accessibility statement" %}
4-
{% set pageDescription = "NHS England is committed to making the NHS digital service manual accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018." %}
4+
{% set pageDescription = "We aim to make the NHS digital service manual as accessible and easy to use as possible." %}
55
{% set dateUpdated = "April 2026" %}
66

77
{% block bodyContent %}
88

9+
<p>NHS England is committed to making the NHS digital service manual accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.</p>
910
<p>This accessibility statement applies to the service manual website, its guidance and the code in its components and patterns.</p>
1011

1112
<h2>How accessible this website is</h2>
@@ -22,7 +23,7 @@
2223

2324
<h2>Preparation of this accessibility statement</h2>
2425
<p>We first published this statement in 2019.</p>
25-
<p>We have updated it after Dig Inclusion carried out an expert independent audit of the whole website in March 2024.</p>
26+
<p>We updated it after our accessibility auditors Dig Inclusion carried out an expert independent assessment of the whole website in March 2024.</p>
2627
<p>We last reviewed and updated the statement in March 2026 when Dig Inclusion audited new components and patterns against the WCAG 2.2 AA standard. (<a href="https://alpha.hugr.app/view/becd7a">The latest service manual audit report from Dig Inclusion is available on HUGR</a>.)</p>
2728

2829
<h2>Feedback and contact information</h2>

app/views/content/writing-nhs-messages.njk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<li class="app-side-nav__item"><a class="app-side-nav__link" href="/content/inclusive-content">Inclusive content</a></li>
2929

30-
<li class="app-side-nav__item app-side-nav__item--current"><a class="app-side-nav__link" href="/content/writing-nhs-messages">Writing NHS messages</a></li>
30+
<li class="app-side-nav__item app-side-nav__item--current"><a class="app-side-nav__link" href="/content/writing-nhs-messages">Writing NHS messages</a>
3131
<ul class="app-side-nav__list app-side-nav__list--nested">
3232
<li class="app-side-nav__item"><a class="app-side-nav__link" href="#who-this-guidance-is-for">Who this guidance is for</a></li>
3333
<li class="app-side-nav__item"><a class="app-side-nav__link" href="#writing-effective-messages">Writing effective messages</a></li>
@@ -38,6 +38,8 @@
3838
<li class="app-side-nav__item"><a class="app-side-nav__link" href="#paper-letters">Paper letters</a></li>
3939
<li class="app-side-nav__item"><a class="app-side-nav__link" href="#supporting-accessibility-and-inclusion">Supporting accessibility and inclusion</a></li>
4040
</ul>
41+
</li>
42+
4143
<li class="app-side-nav__item"><a class="app-side-nav__link" href="/content/formatting">Formatting</a></li>
4244

4345
<li class="app-side-nav__item"><a class="app-side-nav__link" href="/content/punctuation">Punctuation</a></li>
@@ -123,7 +125,7 @@
123125
<h4>Parent, carer and proxy</h4>
124126
<p>If you are writing to an adult who has another person looking after their health (sometimes called a proxy), greet the patient and not their carer to avoid confusion over who the communication is intended for.</p>
125127
<p>Try to avoid using the word "proxy". Research has shown users prefer "carer" or "trusted person".</p>
126-
<p>However, for newborns or children greet the parent or carer. Try to include an identifying detail such as the name or date of birth of the child in the body of the message.</p>
128+
<p>However, greet the parent or carer if you are writing to newborns or children. Try to include an identifying detail such as the name or date of birth of the child in the body of the message.</p>
127129
<div class="app-example app-example--content">
128130
{{ tag({
129131
text: "Example",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% from "card/macro.njk" import card %}
2+
3+
{% set cardDescriptionHtml %}
4+
<p><strong>SenderID</strong>: NHS Blood Test</p>
5+
<p>((firstName)) ((lastName)), you are due for your NHS blood test. Book your appointment or find out more at <a href="#">http://www.nhs.uk/service-name-invite</a></p>
6+
{% endset %}
7+
8+
{{ card({
9+
clickable: false,
10+
heading: "Template: Appointment invitation 1",
11+
headingSize: "m",
12+
actions: {
13+
items: [
14+
{
15+
text: "Edit",
16+
href: "#"
17+
},
18+
{
19+
text: "Delete",
20+
href: "#"
21+
}
22+
]
23+
},
24+
descriptionHtml: cardDescriptionHtml
25+
}) }}

app/views/design-system/components/card/clickable/index.njk

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/views/design-system/components/card/group-half/index.njk

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@
66
primary: true,
77
clickable: true,
88
href: "#",
9-
heading: "Introduction to care and support",
10-
headingClasses: "nhsuk-heading-m",
11-
description: "A quick guide for people who have care and support needs and their carers"
9+
heading: "GPs",
10+
headingSize: "m",
11+
description: "About GP services, including how to find and register with a local GP and how to book an appointment"
1212
}) }}
1313
</li>
1414
<li class="nhsuk-grid-column-one-half nhsuk-card-group__item">
1515
{{ card({
1616
primary: true,
1717
clickable: true,
1818
href: "#",
19-
heading: "Help from social services and charities",
20-
headingClasses: "nhsuk-heading-m",
21-
description: "Includes helplines, needs assessments, advocacy and reporting abuse."
19+
heading: "Hospitals",
20+
headingSize: "m",
21+
description: "About NHS hospitals, booking and changing appointments with the NHS e-Referral Service and going into hospital"
2222
}) }}
2323
</li>
2424
<li class="nhsuk-grid-column-one-half nhsuk-card-group__item">
2525
{{ card({
2626
primary: true,
2727
clickable: true,
2828
href: "#",
29-
heading: "Care services, equipment and care homes",
30-
headingClasses: "nhsuk-heading-m",
31-
description: "Includes home adaptations, help at home from a carer, social care you can get for free and housing."
29+
heading: "Dentists",
30+
headingSize: "m",
31+
description: "About NHS dental services, how to find an NHS dentist and how much treatment costs"
3232
}) }}
3333
</li>
3434
<li class="nhsuk-grid-column-one-half nhsuk-card-group__item">
3535
{{ card({
3636
primary: true,
3737
clickable: true,
3838
href: "#",
39-
heading: "Money, work and benefits",
40-
headingClasses: "nhsuk-heading-m",
41-
description: "How to pay for care and support, and where you can get help with costs"
39+
heading: "Prescriptions",
40+
headingSize: "m",
41+
description: "Find out about prescriptions including charges, repeat prescriptions and if you can get free prescriptions"
4242
}) }}
4343
</li>
4444
</ul>

app/views/design-system/components/card/group-third/index.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
clickable: true,
77
href: "#",
88
heading: "5 steps to mental wellbeing",
9-
headingClasses: "nhsuk-heading-m",
9+
headingSize: "m",
1010
description: "Practical advice to help you feel mentally and emotionally better"
1111
}) }}
1212
</li>
@@ -15,7 +15,7 @@
1515
clickable: true,
1616
href: "#",
1717
heading: "Healthy weight",
18-
headingClasses: "nhsuk-heading-m",
18+
headingSize: "m",
1919
description: "Check your BMI using our healthy weight calculator and find out if you're a healthy weight"
2020
}) }}
2121
</li>
@@ -24,7 +24,7 @@
2424
clickable: true,
2525
href: "#",
2626
heading: "Exercise",
27-
headingClasses: "nhsuk-heading-m",
27+
headingSize: "m",
2828
description: "Programmes, workouts and tips to get you moving and improve your fitness and wellbeing"
2929
}) }}
3030
</li>
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{% from "card/macro.njk" import card %}
22

33
{{ card({
4-
heading: "Heading level",
5-
headingClasses: "nhsuk-heading-s",
4+
heading: "Heading size large",
5+
headingSize: "l",
6+
description: "Card description text goes here"
7+
}) }}
8+
9+
{{ card({
10+
heading: "Heading size medium",
11+
headingSize: "m",
12+
description: "Card description text goes here"
13+
}) }}
14+
15+
{{ card({
16+
heading: "Heading size small",
17+
headingSize: "s",
618
description: "Card description text goes here"
719
}) }}

0 commit comments

Comments
 (0)