From 7712995379aefdb7895823e2bcb48d6527f2ab4c Mon Sep 17 00:00:00 2001 From: Joshua Kitenge Date: Fri, 1 Mar 2024 16:12:33 +0000 Subject: [PATCH 1/6] Change accessibility page variable to be more genera' #356 --- public/res/default.json | 6 +-- .../accessibilityPage.component.tsx | 53 +++++++++---------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/public/res/default.json b/public/res/default.json index d08279ed..4fd6086a 100644 --- a/public/res/default.json +++ b/public/res/default.json @@ -145,7 +145,7 @@ "website-developed-by": "These sites are maintained by the Data Software and Engineering Group, in the Scientific Computing Department. ", "how-accessible-this-website-is": "How Accessible This Website Is ", "how-accessible-this-website-is-text": "We want as many people as possible to be able to use this website. For example, that means you should be able to: ", - "accessibile-parts-of-datagateway-list": [ + "accessible-parts-of-list": [ "listen to most of the website using a screen reader", "clearly see all components and text as the contrast has been checked against different types of colour-blindness in normal or high contrast modes (which includes protanopia, protanomaly, deuteranopia, deuteranomaly, tritanopia, tritanomaly, achromatopsia and achromatomaly) ", "navigate most of the website using just a keyboard ", @@ -153,8 +153,8 @@ ], "advice-on-how-to-make-device-more-accessible": "<0>AbilityNet has advice on making your device easier to use if you have a disability.", "advice-on-how-to-make-device-more-accessible-link": "https://mcmw.abilitynet.org.uk/", - "non-accessibile-parts-of-datagateway-text": "We know some parts of this website are not fully accessible:", - "non-accessibile-parts-of-datagateway-list": [ + "non-accessible-parts-of-text": "We know some parts of this website are not fully accessible:", + "non-accessible-parts-of-list": [ "the columns on table view cannot be resized using the keyboard", "pages sometimes have unreadable ARIA labels", "table view has aria-hidden elements that contain focusable elements and elements in the table with an ARIA role that require a parent are not contained by them ", diff --git a/src/accessibilityPage/accessibilityPage.component.tsx b/src/accessibilityPage/accessibilityPage.component.tsx index 43a56986..db4dd53a 100644 --- a/src/accessibilityPage/accessibilityPage.component.tsx +++ b/src/accessibilityPage/accessibilityPage.component.tsx @@ -41,41 +41,41 @@ const DescriptionTypography = styled(Typography)<{ color: theme.palette.text.primary, })); -const AccessibiiltyPage = (): React.ReactElement => { +const AccessibilityPage = (): React.ReactElement => { const [t] = useTranslation(); - let datagatewayDomains: string[] = t('accessibility-page.domains-list', { + let domains: string[] = t('accessibility-page.domains-list', { returnObjects: true, }); - let datagatewayAccessibileParts: string[] = t( - 'accessibility-page.accessibile-parts-of-datagateway-list', + let accessibleParts: string[] = t( + 'accessibility-page.accessible-parts-of-list', { returnObjects: true, } ); - let datagatewayNonAccessibileParts: string[] = t( - 'accessibility-page.non-accessibile-parts-of-datagateway-list', + let nonAccessibleParts: string[] = t( + 'accessibility-page.non-accessible-parts-of-list', { returnObjects: true, } ); - let datagatewayNonCompliance: string[] = t( + let nonCompliance: string[] = t( 'accessibility-page.non-compliance-with-the-accessibility-regulations-list', { returnObjects: true, } ); - let datagatewayDisproportionateBurdenTable: string[] = t( + let disproportionateBurdenTable: string[] = t( 'accessibility-page.disproportionate-burden.table-view-list', { returnObjects: true, } ); - let datagatewayDisproportionateBurdenCard: string[] = t( + let disproportionateBurdenCard: string[] = t( 'accessibility-page.disproportionate-burden.card-view-list', { returnObjects: true, @@ -87,17 +87,14 @@ const AccessibiiltyPage = (): React.ReactElement => { //When testing can't easily mock i18next data, but **.map will fail if //given a string, so replace the formats here - if (!Array.isArray(datagatewayDomains)) datagatewayDomains = listPlaceholder; - if (!Array.isArray(datagatewayAccessibileParts)) - datagatewayAccessibileParts = listPlaceholder; - if (!Array.isArray(datagatewayNonAccessibileParts)) - datagatewayNonAccessibileParts = listPlaceholder; - if (!Array.isArray(datagatewayNonCompliance)) - datagatewayNonCompliance = listPlaceholder; - if (!Array.isArray(datagatewayDisproportionateBurdenTable)) - datagatewayDisproportionateBurdenTable = listPlaceholder; - if (!Array.isArray(datagatewayDisproportionateBurdenCard)) - datagatewayDisproportionateBurdenCard = listPlaceholder; + if (!Array.isArray(domains)) domains = listPlaceholder; + if (!Array.isArray(accessibleParts)) accessibleParts = listPlaceholder; + if (!Array.isArray(nonAccessibleParts)) nonAccessibleParts = listPlaceholder; + if (!Array.isArray(nonCompliance)) nonCompliance = listPlaceholder; + if (!Array.isArray(disproportionateBurdenTable)) + disproportionateBurdenTable = listPlaceholder; + if (!Array.isArray(disproportionateBurdenCard)) + disproportionateBurdenCard = listPlaceholder; return ( @@ -111,7 +108,7 @@ const AccessibiiltyPage = (): React.ReactElement => { - {datagatewayDomains.map((item) => ( + {domains.map((item) => (
  • {item}
  • @@ -132,7 +129,7 @@ const AccessibiiltyPage = (): React.ReactElement => { {t('accessibility-page.how-accessible-this-website-is-text')}
    - {datagatewayAccessibileParts.map((item) => ( + {accessibleParts.map((item) => (
  • {item}
  • ))}
    @@ -157,11 +154,11 @@ const AccessibiiltyPage = (): React.ReactElement => { - {t('accessibility-page.non-accessibile-parts-of-datagateway-text')} + {t('accessibility-page.non-accessible-parts-of-text')} - {datagatewayNonAccessibileParts.map((item) => ( + {accessibleParts.map((item) => (
  • {item}
  • ))}
    @@ -243,7 +240,7 @@ const AccessibiiltyPage = (): React.ReactElement => { - {datagatewayNonCompliance.map((item) => ( + {nonCompliance.map((item) => (
  • {item}
  • ))}
    @@ -264,7 +261,7 @@ const AccessibiiltyPage = (): React.ReactElement => { - {datagatewayDisproportionateBurdenTable.map((item) => ( + {disproportionateBurdenTable.map((item) => (
  • {item}
  • ))}
    @@ -275,7 +272,7 @@ const AccessibiiltyPage = (): React.ReactElement => { - {datagatewayDisproportionateBurdenCard.map((item) => ( + {disproportionateBurdenCard.map((item) => (
  • {item}
  • ))}
    @@ -319,4 +316,4 @@ const AccessibiiltyPage = (): React.ReactElement => { ); }; -export default AccessibiiltyPage; +export default AccessibilityPage; From bd3409959cc95d5f4e3a8dde25501c900da956ed Mon Sep 17 00:00:00 2001 From: Joshua Kitenge Date: Fri, 1 Mar 2024 16:45:59 +0000 Subject: [PATCH 2/6] fix snapshot --- .../accessibilityPage.component.test.tsx.snap | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/accessibilityPage/__snapshots__/accessibilityPage.component.test.tsx.snap b/src/accessibilityPage/__snapshots__/accessibilityPage.component.test.tsx.snap index 4db431c4..01932c1a 100644 --- a/src/accessibilityPage/__snapshots__/accessibilityPage.component.test.tsx.snap +++ b/src/accessibilityPage/__snapshots__/accessibilityPage.component.test.tsx.snap @@ -62,10 +62,10 @@ exports[`Accessibility page component should render correctly and display contac class="MuiTypography-root MuiTypography-body1 css-158lj4w-MuiTypography-root" >
  • - accessibility-page.accessibile-parts-of-datagateway-list0 + accessibility-page.accessible-parts-of-list0
  • - accessibility-page.accessibile-parts-of-datagateway-list1 + accessibility-page.accessible-parts-of-list1
  • @@ -86,16 +86,16 @@ exports[`Accessibility page component should render correctly and display contac

    - accessibility-page.non-accessibile-parts-of-datagateway-text + accessibility-page.non-accessible-parts-of-text

    • - accessibility-page.non-accessibile-parts-of-datagateway-list0 + accessibility-page.accessible-parts-of-list0
    • - accessibility-page.non-accessibile-parts-of-datagateway-list1 + accessibility-page.accessible-parts-of-list1
    From f5e88b4eb6f13f304c4ce288af882c633f7807bf Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Mon, 20 May 2024 13:11:28 +0000 Subject: [PATCH 3/6] Fix error colour inconsistency found on IMS ral-facilities/inventory-management-system#465 --- src/theming.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/theming.tsx b/src/theming.tsx index 5d6e90a7..c323bc59 100644 --- a/src/theming.tsx +++ b/src/theming.tsx @@ -72,7 +72,7 @@ interface ThemeColours { /* Lighter colours */ lightBlue: string; //Used for lighter coloured buttons - lightOrange: string; //Used for notifcation icon + lightOrange: string; //Used for notification icon /* Darker colours */ darkGreen: string; //Used for cookie consent message @@ -479,6 +479,9 @@ export const buildTheme = ( secondary: { main: colours.secondary, }, + error: { + main: colours.red, + }, text: { secondary: colours.textSecondary, }, From d669c2738c5a797571964208bff0d699562e8fa8 Mon Sep 17 00:00:00 2001 From: VKTB <45173816+VKTB@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:27:20 +0000 Subject: [PATCH 4/6] Bump @types/node from 20.11.5 to 20.14.0 --- package.json | 2 +- yarn.lock | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f188de25..dfc30817 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@testing-library/react": "12.1.5", "@testing-library/user-event": "14.5.2", "@types/jsonwebtoken": "9.0.1", - "@types/node": "20.11.5", + "@types/node": "20.14.0", "@types/react": "17.0.38", "@types/react-redux": "7.1.20", "@types/react-router": "5.1.12", diff --git a/yarn.lock b/yarn.lock index 03fe50ad..a5f2903c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3322,7 +3322,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:20.11.5": +"@types/node@npm:*": version: 20.11.5 resolution: "@types/node@npm:20.11.5" dependencies: @@ -3331,6 +3331,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:20.14.0": + version: 20.14.0 + resolution: "@types/node@npm:20.14.0" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10/49b332fbf8aee4dc4f61cc1f1f6e130632510f795dd7b274e55894516feaf4bec8a3d13ea764e2443e340a64ce9bbeb006d14513bf6ccdd4f21161eccc7f311e + languageName: node + linkType: hard + "@types/parse-json@npm:^4.0.0": version: 4.0.0 resolution: "@types/parse-json@npm:4.0.0" @@ -13884,7 +13893,7 @@ __metadata: "@types/jest": "npm:29.5.2" "@types/js-cookie": "npm:3.0.1" "@types/jsonwebtoken": "npm:9.0.1" - "@types/node": "npm:20.11.5" + "@types/node": "npm:20.14.0" "@types/react": "npm:17.0.38" "@types/react-dom": "npm:17.0.11" "@types/react-redux": "npm:7.1.20" From fbcd3fac605a401548b091aee6004f993a520d56 Mon Sep 17 00:00:00 2001 From: VKTB <45173816+VKTB@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:27:38 +0000 Subject: [PATCH 5/6] Bump node from 20.11.1-alpine3.19 to 20.14.0-alpine3.20 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 53154645..26276e7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile to build and serve scigateway # Build stage -FROM node:20.11.1-alpine3.19@sha256:bf77dc26e48ea95fca9d1aceb5acfa69d2e546b765ec2abfb502975f1a2d4def as builder +FROM node:20.14.0-alpine3.20@sha256:928b24aaadbd47c1a7722c563b471195ce54788bf8230ce807e1dd500aec0549 as builder WORKDIR /scigateway-build From 66c8dd9b3383092e1725cb57f4c1822164f127e2 Mon Sep 17 00:00:00 2001 From: VKTB <45173816+VKTB@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:27:51 +0000 Subject: [PATCH 6/6] Bump httpd from 2.4.58-alpine3.19 to 2.4.59-alpine3.20 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 26276e7c..ebcf5089 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY docker/settings.json public/settings.json RUN yarn build # Run stage -FROM httpd:2.4.58-alpine3.19@sha256:92535cf7f151901ba91b04186292c3bd5bf82aa6ffa6eb7bc405fefbffedd480 +FROM httpd:2.4.59-alpine3.20@sha256:554f25b8496f360a58febaaa5df9effb8e037cc1b70b27d40b7353a85e8edbf0 WORKDIR /usr/local/apache2/htdocs