From 281d8f8a513f9387861994715c6078bf2c94e4a5 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 11:15:34 +0000 Subject: [PATCH 1/7] rename onClickAccessibilityStatement Signed-off-by: Nilesh Gupta --- src/components/Footer/BottomBar.stories.tsx | 2 +- src/components/Footer/BottomBar.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Footer/BottomBar.stories.tsx b/src/components/Footer/BottomBar.stories.tsx index e603697..aa9f382 100644 --- a/src/components/Footer/BottomBar.stories.tsx +++ b/src/components/Footer/BottomBar.stories.tsx @@ -13,7 +13,7 @@ export const BottomBar: Story = { args: { title: 'Accessibility Statement', email: 'team@example.com', - clickAccessibility: () => console.log('Click Accessibility'), + onClickAccessibilityStatement: () => console.log('Click Accessibility'), url: 'http://localhost:6006' } }; \ No newline at end of file diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index c0e3689..244b38c 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -4,11 +4,11 @@ import {AppBar, Box, Link, Toolbar, Typography} from "@mui/material"; export interface BottomBarProps { title: string; email: string; - clickAccessibility: () => void; + onClickAccessibilityStatement: () => void; url: string; } -export const BottomBar = ({title, email, clickAccessibility, url}: BottomBarProps) => { +export const BottomBar = ({title, email, onClickAccessibilityStatement, url}: BottomBarProps) => { return ( Email us { window.location.hash = 'accessibility'; - clickAccessibility(); + onClickAccessibilityStatement(); }} title={`${title}`}> Accessibility statement From c25b03c603333db6f582f2dd45b1e735849ec7bf Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 13:57:56 +0000 Subject: [PATCH 2/7] update scroll section Signed-off-by: Nilesh Gupta --- package-lock.json | 73 +++++++++++++++++++ .../AccessibilityStatement.stories.tsx | 3 +- .../Accessibility/AccessibilityStatement.tsx | 19 ++++- src/components/Footer/BottomBar.tsx | 7 +- 4 files changed, 93 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebae341..adbda77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5483,6 +5483,13 @@ "@types/node": "*" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/css-mediaquery": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@types/css-mediaquery/-/css-mediaquery-0.1.4.tgz", @@ -14047,6 +14054,58 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, + "node_modules/react-router": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.0.tgz", + "integrity": "sha512-1xf+yMVhUjAzZGY90ZnYJ9KVe1R8FggpugzRBkh+p6vl4cC1sHDe3nO+r5rxWTAgCMf8uN5hfoV2M7rLVTWPUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.0.0.tgz", + "integrity": "sha512-2QAxXpwgQuh423C64oZiV2cCKPCNUgZxcvZaS8O0PAHPZ/z8kTq7YbGD4KTNZm6Yj66d+HAfGkWPp8MCpdtD+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "react-router": "7.0.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/react-router/node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -14849,6 +14908,13 @@ "node": ">= 0.8.0" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "dev": true, + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -15779,6 +15845,13 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "dev": true, + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/src/components/Accessibility/AccessibilityStatement.stories.tsx b/src/components/Accessibility/AccessibilityStatement.stories.tsx index 195a224..d09c94a 100644 --- a/src/components/Accessibility/AccessibilityStatement.stories.tsx +++ b/src/components/Accessibility/AccessibilityStatement.stories.tsx @@ -12,6 +12,7 @@ type Story = StoryObj; export const AccessibilityStatement: Story = { args: { teamEmail: 'team@example.com', - emailUsToReportAProblem: () => console.log('Email us to report a problem') + sendReportProblemGaEvent: () => console.log('Email us to report a problem'), + scrollSection: "" } }; \ No newline at end of file diff --git a/src/components/Accessibility/AccessibilityStatement.tsx b/src/components/Accessibility/AccessibilityStatement.tsx index 0479068..c1148ba 100644 --- a/src/components/Accessibility/AccessibilityStatement.tsx +++ b/src/components/Accessibility/AccessibilityStatement.tsx @@ -1,16 +1,27 @@ -import React from 'react'; +import React,{ useEffect } from 'react'; import {Box, Button, Link, List, ListItem, ListItemIcon, ListItemText, Typography} from '@mui/material'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; export interface IAccessibilityStatementProps { teamEmail: string; - emailUsToReportAProblem: () => void; + sendReportProblemGaEvent: () => void; + scrollSection: string; } export const AccessibilityStatement = ({ teamEmail, - emailUsToReportAProblem + sendReportProblemGaEvent, + scrollSection }: IAccessibilityStatementProps) => { + useEffect(() => { + if (scrollSection) { + const element = document.getElementById(scrollSection); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } + } + }, [scrollSection]); + return ( diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index 244b38c..3a2b343 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -1,14 +1,13 @@ import React from 'react'; -import {AppBar, Box, Link, Toolbar, Typography} from "@mui/material"; +import {AppBar, Link, Toolbar, Typography} from "@mui/material"; export interface BottomBarProps { - title: string; email: string; onClickAccessibilityStatement: () => void; url: string; } -export const BottomBar = ({title, email, onClickAccessibilityStatement, url}: BottomBarProps) => { +export const BottomBar = ({email, onClickAccessibilityStatement, url}: BottomBarProps) => { return ( { window.location.hash = 'accessibility'; onClickAccessibilityStatement(); - }} title={`${title}`}> + }}> Accessibility statement Give feedback From 72674cb51dfda37028b2324e7abc56063069d218 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 14:12:29 +0000 Subject: [PATCH 3/7] update using href for accessibility Signed-off-by: Nilesh Gupta --- src/components/Footer/BottomBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index 3a2b343..f798212 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -18,8 +18,7 @@ export const BottomBar = ({email, onClickAccessibilityStatement, url}: BottomBar }}> Support links: Email us - { - window.location.hash = 'accessibility'; + { onClickAccessibilityStatement(); }}> Accessibility statement From bacfa0b2a51fefdccc5cd238755a1cf5836b9fed Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 14:36:13 +0000 Subject: [PATCH 4/7] update #accessibility/ in href Signed-off-by: Nilesh Gupta --- .../Accessibility/AccessibilityStatement.tsx | 12 ++++++------ src/components/Footer/BottomBar.tsx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Accessibility/AccessibilityStatement.tsx b/src/components/Accessibility/AccessibilityStatement.tsx index c1148ba..0bff882 100644 --- a/src/components/Accessibility/AccessibilityStatement.tsx +++ b/src/components/Accessibility/AccessibilityStatement.tsx @@ -34,37 +34,37 @@ export const AccessibilityStatement = ({ In this page: - + - + - + - + - + - + diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index f798212..f7fd1a4 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -18,7 +18,7 @@ export const BottomBar = ({email, onClickAccessibilityStatement, url}: BottomBar }}> Support links: Email us - { + { onClickAccessibilityStatement(); }}> Accessibility statement From c7ec4124f12a246ed72fd0fa6e4d7ff72a1d6a59 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 14:52:05 +0000 Subject: [PATCH 5/7] adding padding to button Signed-off-by: Nilesh Gupta --- .../Accessibility/AccessibilityStatement.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/Accessibility/AccessibilityStatement.tsx b/src/components/Accessibility/AccessibilityStatement.tsx index 0bff882..2d2b0aa 100644 --- a/src/components/Accessibility/AccessibilityStatement.tsx +++ b/src/components/Accessibility/AccessibilityStatement.tsx @@ -1,4 +1,4 @@ -import React,{ useEffect } from 'react'; +import React, {useEffect} from 'react'; import {Box, Button, Link, List, ListItem, ListItemIcon, ListItemText, Typography} from '@mui/material'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; @@ -17,7 +17,7 @@ export const AccessibilityStatement = ({ if (scrollSection) { const element = document.getElementById(scrollSection); if (element) { - element.scrollIntoView({ behavior: 'smooth' }); + element.scrollIntoView({behavior: 'smooth'}); } } }, [scrollSection]); @@ -140,12 +140,14 @@ export const AccessibilityStatement = ({ Feedback and contact information - The Dynamic Response Tool (DRT) team, which works within Technology - Delivery Centre, is responsible for the accessibility of this service. We’re always looking to improve the - accessibility of this website. If you - find any problems not listed on this page or think we’re not meeting other accessibility requirements, - contact us: - From aea6e0c0554d81664802e1212cd484dfa5410bc6 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 22 Nov 2024 14:56:53 +0000 Subject: [PATCH 6/7] adding drt theme Signed-off-by: Nilesh Gupta --- .../Accessibility/AccessibilityStatement.tsx | 370 +++++++++--------- src/components/Footer/BottomBar.tsx | 37 +- 2 files changed, 209 insertions(+), 198 deletions(-) diff --git a/src/components/Accessibility/AccessibilityStatement.tsx b/src/components/Accessibility/AccessibilityStatement.tsx index 2d2b0aa..97098bc 100644 --- a/src/components/Accessibility/AccessibilityStatement.tsx +++ b/src/components/Accessibility/AccessibilityStatement.tsx @@ -1,6 +1,7 @@ import React, {useEffect} from 'react'; -import {Box, Button, Link, List, ListItem, ListItemIcon, ListItemText, Typography} from '@mui/material'; +import {Box, Button, Link, List, ListItem, ListItemIcon, ListItemText, ThemeProvider, Typography} from '@mui/material'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; +import {drtTheme} from "../../index"; export interface IAccessibilityStatementProps { teamEmail: string; @@ -23,255 +24,262 @@ export const AccessibilityStatement = ({ }, [scrollSection]); return ( - - - Accessibility statement for Dynamic Response Tool (DRT) - - - In this page: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Accessibility statement for Dynamic Response Tool (DRT) + - Introduction - This accessibility statement applies to https://drt.homeoffice.gov.uk/. - This website is run by Technology Delivery Centre, part of Home Office Digital, Data and Technology - Directorate’s Migration and Borders Technology Portfolio, on behalf of Border Force. We want as many people - as possible to be able to use this website. For example, that means you should be able to: - - - - - - - - + In this page: + + - + - + - + - + - + - - We’ve also made the website text as simple as possible to understand. - AbilityNet has - advice on making your device easier to use if you have a disability. - - - How accessible this service is - We know some parts of this website are not fully - accessible: - - + - + - + - + - + - + - Feedback and contact information - The Dynamic Response Tool (DRT) team, which - works within Technology Delivery Centre, is responsible for the accessibility of this service. We’re always - looking to improve the accessibility of - this website. If you find any problems not listed on this page or think we’re not meeting other - accessibility requirements, contact us: - - - - - Enforcement procedure - The Equality and Human Rights Commission (EHRC) is responsible for - enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 - (the ‘accessibility regulations’). - If you’re not happy with how we respond to your complaint, contact the Equality - Advisory and Support Service (EASS). - - - - Technical information about this website’s - accessibility - Border Force is committed to making its websites accessible, in - accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility - Regulations 2018. - - Compliance status - The website has been tested against the Web Content Accessibility - Guidelines (WCAG) 2.1 AA standard. - This website is partially compliant with the Web Content Accessibility - Guidelines (WCAG) 2.1 AA standard (https://www.w3.org/TR/WCAG21/). The - non-compliances are listed below. - - Non-compliant content within the accessibility - regulations + Introduction + This accessibility statement applies to https://drt.homeoffice.gov.uk/. + This website is run by Technology Delivery Centre, part of Home Office Digital, Data and Technology + Directorate’s Migration and Borders Technology Portfolio, on behalf of Border Force. We want as many + people + as possible to be able to use this website. For example, that means you should be able to: - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + + primary="listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and VoiceOver)"/> + + We’ve also made the website text as simple as possible to understand. + AbilityNet has + advice on making your device easier to use if you have a disability. + + + How accessible this service is + We know some parts of this website are not fully + accessible: + - + - + - + - - - What we’re doing to improve accessibility - We plan to address the above areas of non-compliance with accessibility - regulations on this website by February 2025. - - - - Preparation of this accessibility statement - This statement was prepared on 15 November 2021. + + Feedback and contact information + The Dynamic Response Tool (DRT) team, which + works within Technology Delivery Centre, is responsible for the accessibility of this service. We’re + always + looking to improve the accessibility of + this website. If you find any problems not listed on this page or think we’re not meeting other + accessibility requirements, contact us: + + + + + Enforcement procedure + The Equality and Human Rights Commission (EHRC) is responsible for + enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations + 2018 + (the ‘accessibility regulations’). + If you’re not happy with how we respond to your complaint, contact the Equality + Advisory and Support Service (EASS). + + + + Technical information about this website’s + accessibility + Border Force is committed to making its websites accessible, in + accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility + Regulations 2018. + + Compliance status + The website has been tested against the Web Content Accessibility + Guidelines (WCAG) 2.1 AA standard. + This website is partially compliant with the Web Content + Accessibility + Guidelines (WCAG) 2.1 AA standard (https://www.w3.org/TR/WCAG21/). The + non-compliances are listed below. + + + Non-compliant content within the accessibility + regulations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + What we’re doing to improve accessibility + We plan to address the above areas of non-compliance with + accessibility + regulations on this website by February 2025. + + + + Preparation of this accessibility statement + This statement was prepared on 15 November 2021. + - + ); }; \ No newline at end of file diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index f7fd1a4..5283218 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import {AppBar, Link, Toolbar, Typography} from "@mui/material"; +import {AppBar, Link, ThemeProvider, Toolbar, Typography} from "@mui/material"; +import {drtTheme} from "../../index"; export interface BottomBarProps { email: string; @@ -9,23 +10,25 @@ export interface BottomBarProps { export const BottomBar = ({email, onClickAccessibilityStatement, url}: BottomBarProps) => { return ( - - - Support links: - Email us - { - onClickAccessibilityStatement(); + + + - Accessibility statement - - Give feedback - - + Support links: + Email us + { + onClickAccessibilityStatement(); + }}> + Accessibility statement + + Give feedback + + + ); }; From 4b4c6172a422330df25882cfbdaae7f6883b293b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 25 Nov 2024 10:14:20 +0000 Subject: [PATCH 7/7] remove the explicit theme provider for bottom bar Signed-off-by: Nilesh Gupta --- src/components/Footer/BottomBar.tsx | 37 +++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/components/Footer/BottomBar.tsx b/src/components/Footer/BottomBar.tsx index 5283218..f7fd1a4 100644 --- a/src/components/Footer/BottomBar.tsx +++ b/src/components/Footer/BottomBar.tsx @@ -1,6 +1,5 @@ import React from 'react'; -import {AppBar, Link, ThemeProvider, Toolbar, Typography} from "@mui/material"; -import {drtTheme} from "../../index"; +import {AppBar, Link, Toolbar, Typography} from "@mui/material"; export interface BottomBarProps { email: string; @@ -10,25 +9,23 @@ export interface BottomBarProps { export const BottomBar = ({email, onClickAccessibilityStatement, url}: BottomBarProps) => { return ( - - - + + Support links: + Email us + { + onClickAccessibilityStatement(); }}> - Support links: - Email us - { - onClickAccessibilityStatement(); - }}> - Accessibility statement - - Give feedback - - - + Accessibility statement + + Give feedback + + ); };