Skip to content

Commit c04649b

Browse files
authored
fix: upgrade to latest version of Next.js to fix middleware vuln (#847)
* fix: upgrade to latest version of Next.js to fix middleware vuln * fix: remove unnecessary roles from the table component * fix: fix dependencies, linting issues and quietDeps sass warnings
1 parent 15738c0 commit c04649b

File tree

6 files changed

+644
-153
lines changed

6 files changed

+644
-153
lines changed

application/CohortManager/src/Web/app/accessibility-statement/page.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,41 +56,45 @@ export default async function Page() {
5656
</p>
5757
<h2>Reporting accessibility problems with this website</h2>
5858
<p>
59-
We're always looking to improve the accessibility of this website.
60-
If you find any problems not listed on this page or think we're not
61-
meeting accessibility requirements, please contact{" "}
59+
We&apos;re always looking to improve the accessibility of this
60+
website. If you find any problems not listed on this page or think
61+
we&apos;re not meeting accessibility requirements, please contact{" "}
6262
<a href="mailto:[email protected]">
6363
64-
</a>. This helps us improve.
64+
</a>
65+
. This helps us improve.
6566
</p>
6667
<h2>Enforcement procedure</h2>
6768
<p>
6869
If you contact us with a complaint and you are not happy with our
6970
response,{" "}
7071
<a href="https://www.equalityadvisoryservice.com/">
7172
contact the Equality Advisory and Support Service (EASS)
72-
</a>.
73+
</a>
74+
.
7375
</p>
7476
<p>
7577
The Equality and Human Rights Commission (EHRC) is responsible for
7678
enforcing the{" "}
7779
<a href="https://www.legislation.gov.uk/uksi/2018/952/contents/made">
7880
Public Sector Bodies (Websites and Mobile Applications) (No. 2)
7981
Accessibility Regulations 2018 on legislation.gov.uk
80-
</a> (the "accessibility regulations").
82+
</a>{" "}
83+
(the &quot;accessibility regulations&quot;).
8184
</p>
8285
<h2>Technical information about this website&apos;s accessibility</h2>
8386
<p>
8487
This service is compliant with the{" "}
8588
<a href="http://www.w3.org/TR/WCAG21/">
8689
Web Content Accessibility Guidelines (WCAG) version 2.1 AA
8790
standard
88-
</a>.
91+
</a>
92+
.
8993
</p>
9094
<h2>Preparation of this accessibility statement</h2>
9195
<p>This statement was prepared on 2 December 2024.</p>
9296
<p>
93-
This website's accessibility will be reviewed on a regular and
97+
This website&apos;s accessibility will be reviewed on a regular and
9498
continuous basis.
9599
</p>
96100
</div>

application/CohortManager/src/Web/app/components/exceptionsTable.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ExceptionDetails } from "@/app/types";
21
import Link from "next/link";
2+
import { ExceptionDetails } from "@/app/types";
33
import { formatNhsNumber, formatDate } from "@/app/lib/utils";
44

55
interface ExceptionsTableProps {
@@ -16,7 +16,7 @@ export default function ExceptionsTable({
1616
<caption className="nhsuk-table__caption">
1717
{caption ? `${caption}` : "Total breast screening exceptions"}
1818
</caption>
19-
<thead role="rowgroup" className="nhsuk-table__head">
19+
<thead className="nhsuk-table__head">
2020
<tr role="row">
2121
<th role="columnheader" scope="col">
2222
Exception ID
@@ -39,7 +39,7 @@ export default function ExceptionsTable({
3939
className="nhsuk-table__row"
4040
key={exception.exceptionId}
4141
>
42-
<td role="cell" className="nhsuk-table__cell">
42+
<td className="nhsuk-table__cell">
4343
<span
4444
className="nhsuk-table-responsive__heading"
4545
aria-hidden="true"
@@ -50,7 +50,7 @@ export default function ExceptionsTable({
5050
{exception.exceptionId}
5151
</Link>
5252
</td>
53-
<td role="cell" className="nhsuk-table__cell app-u-no-wrap">
53+
<td className="nhsuk-table__cell app-u-no-wrap">
5454
<span
5555
className="nhsuk-table-responsive__heading"
5656
aria-hidden="true"
@@ -59,7 +59,7 @@ export default function ExceptionsTable({
5959
</span>
6060
{formatNhsNumber(exception.nhsNumber ?? "")}
6161
</td>
62-
<td role="cell" className="nhsuk-table__cell app-u-no-wrap">
62+
<td className="nhsuk-table__cell app-u-no-wrap">
6363
<span
6464
className="nhsuk-table-responsive__heading"
6565
aria-hidden="true"
@@ -68,7 +68,7 @@ export default function ExceptionsTable({
6868
</span>
6969
{formatDate(exception.dateCreated)}
7070
</td>
71-
<td role="cell" className="nhsuk-table__cell">
71+
<td className="nhsuk-table__cell">
7272
<span
7373
className="nhsuk-table-responsive__heading"
7474
aria-hidden="true"

application/CohortManager/src/Web/app/components/signIn.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import styles from "@/app/styles/components/signIn.module.scss";
22
import { signIn } from "@/app/lib/auth";
33

4+
import type { JSX } from "react";
5+
46
interface SignInProps {
57
serviceName?: string;
68
headingLevel?: 1 | 2 | 3 | 4;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: "standalone",
4+
sassOptions: {
5+
quietDeps: true,
6+
includePaths: ["./node_modules/nhsuk-frontend"],
7+
},
48
};
59

610
export default nextConfig;

0 commit comments

Comments
 (0)