From 48ba77b6d10fa4a0e7744a20d4a67e85736fd15f Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 19 May 2026 16:30:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5(frontend)=20remove=20patch=20follo?= =?UTF-8?q?wing=20upgrade=20of=20Cunningham?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A patch about tabindex was added to the codebase to fix an accessibility issue. However, after upgrading Cunningham, the issue seems to have been resolved and the patch is no longer necessary. Therefore, we are removing the patch to keep our code clean and maintainable. --- .../impress/src/components/modal/AlertModal.tsx | 17 +---------------- .../docs/doc-tree/components/DocTree.tsx | 5 +++++ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/frontend/apps/impress/src/components/modal/AlertModal.tsx b/src/frontend/apps/impress/src/components/modal/AlertModal.tsx index 1f8b79b19..b138f8b25 100644 --- a/src/frontend/apps/impress/src/components/modal/AlertModal.tsx +++ b/src/frontend/apps/impress/src/components/modal/AlertModal.tsx @@ -5,7 +5,7 @@ import { ModalDefaultVariantProps, ModalSize, } from '@gouvfr-lasuite/cunningham-react'; -import { ReactNode, useEffect } from 'react'; +import { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Box } from '../Box'; @@ -35,21 +35,6 @@ export const AlertModal = ({ }: AlertModalProps) => { const { t } = useTranslation(); - /** - * TODO: - * Remove this effect when Cunningham will have this patch released: - * https://github.com/suitenumerique/cunningham/pull/377 - */ - useEffect(() => { - const timeout = setTimeout(() => { - const contents = document.querySelectorAll('.c__modal__content'); - contents.forEach((content) => { - content.setAttribute('tabindex', '-1'); - }); - }, 100); - return () => clearTimeout(timeout); - }, []); - return ( { aria-label={t('Document tree')} aria-describedby="doc-tree-keyboard-instructions" $css={css` + /** + * TODO: When this pull request is merged (https://github.com/suitenumerique/ui-kit/pull/215), we + * should remove the pointer-events manipulation. + * See: https://github.com/suitenumerique/docs/commit/d41e44dcd5a4111463b1bddfdab640faacbf1795 + */ /* Remove outline from TreeViewItem wrapper elements */ .c__tree-view--row { outline: none !important;