From da2ad0118f9f0acd01168077c4268cb8d53c3904 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 4 Mar 2024 11:03:20 +0100 Subject: [PATCH] fix: a11y errors --- .../mon-entreprise/secondary-pages.ts | 5 +++-- .../design-system/field/Select/index.tsx | 9 +++++--- site/source/pages/statistiques/Stats.tsx | 21 ++++++++++++------- site/source/pages/statistiques/StatsPage.tsx | 1 + .../_components/AccessibleTable.tsx | 2 +- site/source/pages/statistiques/index.tsx | 10 ++++++++- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/site/cypress/integration/mon-entreprise/secondary-pages.ts b/site/cypress/integration/mon-entreprise/secondary-pages.ts index 4707df2de..994da0d42 100644 --- a/site/cypress/integration/mon-entreprise/secondary-pages.ts +++ b/site/cypress/integration/mon-entreprise/secondary-pages.ts @@ -10,9 +10,10 @@ describe('Secondary pages', function () { cy.contains('Statistiques') }) - it('Statistics page should be RGAA compliant', function () { + it.only('Statistics page should be RGAA compliant', function () { cy.visit('/stats') - cy.contains('Statistiques') + cy.contains('Activer le mode accessibilité').click() + cy.get('table').should('be.visible') checkA11Y() }) diff --git a/site/source/design-system/field/Select/index.tsx b/site/source/design-system/field/Select/index.tsx index bbc783553..ea9775886 100644 --- a/site/source/design-system/field/Select/index.tsx +++ b/site/source/design-system/field/Select/index.tsx @@ -1,6 +1,6 @@ import { useButton } from '@react-aria/button' import { useFocusRing } from '@react-aria/focus' -import { HiddenSelect, useSelect } from '@react-aria/select' +import { useSelect } from '@react-aria/select' import { mergeProps } from '@react-aria/utils' import { useSelectState } from '@react-stately/select' import type { AriaSelectProps } from '@react-types/select' @@ -186,12 +186,15 @@ export function Select>( return ( - + /> */} {props.label && (