From 57cb79fd5654665fa1bf4e581f3f844f06f8a54e Mon Sep 17 00:00:00 2001 From: Xavier Desoindre Date: Tue, 26 Nov 2024 16:45:36 +0100 Subject: [PATCH] improve accessibility --- .github/workflows/e2e.yml | 2 +- package.json | 2 +- src/components/outils/CategoryDisplayAll.tsx | 6 ++++-- src/components/outils/CategorySimulator.tsx | 5 ++++- .../AlimentationSubCategory.module.css | 9 ++++----- .../alimentation/AlimentationSubCategory.tsx | 17 ++++++++++------- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d8693a9c8..9c62a0184 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -52,7 +52,7 @@ jobs: id: lighthouseCheck with: device: all - urls: 'http://localhost:3000,http://localhost:3000/outils/comparateur,http://localhost:3000/outils/usagenumerique,http://localhost:3000/outils/livraison,http://localhost:3000/outils/chauffage,http://localhost:3000/outils/transport,http://localhost:3000/outils/fruitsetlegumes,http://localhost:3000/outils/chauffage/pompeachaleur,http://localhost:3000/outils/usagenumerique/visioconference,http://localhost:3000/outils/quiz' + urls: 'http://localhost:3000,http://localhost:3000/outils/comparateur,http://localhost:3000/outils/usagenumerique,http://localhost:3000/outils/livraison,http://localhost:3000/outils/chauffage,http://localhost:3000/outils/transport,http://localhost:3000/outils/fruitsetlegumes,http://localhost:3000/outils/chauffage/pompeachaleur,http://localhost:3000/outils/usagenumerique/visioconference,http://localhost:3000/outils/quiz,http://localhost:3000/outils/alimentation' outputDirectory: ${{ github.workspace }}/tmp/artifacts - name: Verify Lighthouse Check results uses: foo-software/lighthouse-check-status-action@master diff --git a/package.json b/package.json index 54754d7d3..716344b5d 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "testIframes": "npx playwright install chromium; npx ts-node -r dotenv/config src/scripts/testIframes.ts" }, "engines": { - "node": "22", + "node": ">22", "yarn": "1.22" }, "dependencies": { diff --git a/src/components/outils/CategoryDisplayAll.tsx b/src/components/outils/CategoryDisplayAll.tsx index 71b34ea9d..1726b2b78 100644 --- a/src/components/outils/CategoryDisplayAll.tsx +++ b/src/components/outils/CategoryDisplayAll.tsx @@ -1,18 +1,20 @@ 'use client' -import React, { Dispatch, SetStateAction } from 'react' +import { Dispatch, SetStateAction } from 'react' import { track } from 'utils/matomo' import DropdownArrowDownIcon from 'components/base/icons/dropdown-arrow-down' import DropdownArrowUpIcon from 'components/base/icons/dropdown-arrow-up' import styles from './CategoryDisplayAll.module.css' const CategoryDisplayAll = ({ + id, tracking, displayAll, setDisplayAll, displayAllText, hideAllText, }: { + id?: string tracking: string displayAll: boolean setDisplayAll: Dispatch> @@ -23,7 +25,7 @@ const CategoryDisplayAll = ({ - {display && ( -
- -
- )} +
+ {display && ( +
+ +
+ )} +
) }