Skip to content

Commit

Permalink
[PRMP-1330] - Add service-updates-link to footer (#491)
Browse files Browse the repository at this point in the history
* [PRMP-1330] - Add service-updates-link to footer

* [PRMP-1330] - Remove brackets in aria-label for screen readers

* [PRMP-1330] - Add test for rendering service-updates-link

* [PRMP-1330] - Modify footer to use constant instead of react component

* [PRMP-1330] - Undo privacy-link modification
  • Loading branch information
MohammadIqbalAD-NHS authored Jan 8, 2025
1 parent 7f07d73 commit ad25b30
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/src/components/layout/footer/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ describe('Footer', () => {
render(<Footer />);
expect(screen.getByTestId('privacy-link')).toBeInTheDocument();
});
it('renders service updates link', () => {
render(<Footer />);
expect(screen.getByTestId('service-updates-link')).toBeInTheDocument();
});
});

describe('Navigation', () => {
Expand Down
14 changes: 13 additions & 1 deletion app/src/components/layout/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import React from 'react';
import { Footer as NHSFooter } from 'nhsuk-react-components';
import { routes } from '../../../types/generic/routes';

const serviceUpdatesLink =
'https://digital.nhs.uk/services/access-and-store-digital-patient-documents/service-updates';

function Footer() {
return (
<NHSFooter>
Expand All @@ -11,10 +14,19 @@ function Footer() {
data-testid="privacy-link"
rel="opener"
target="_blank"
aria-label="(Privacy notice - this link will open in a new tab)"
aria-label="Privacy notice - Opens in a new tab"
>
Privacy notice
</NHSFooter.ListItem>
<NHSFooter.ListItem
href={serviceUpdatesLink}
data-testid="service-updates-link"
rel="noopener"
target="_blank"
aria-label="Service updates - Opens in a new tab"
>
Service updates
</NHSFooter.ListItem>
</NHSFooter.List>
{/* TODO - PRMP-1348: Remove hardcoded styling below if no longer required */}
<NHSFooter.Copyright style={{ color: '#231f20' }}>
Expand Down

0 comments on commit ad25b30

Please sign in to comment.